Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.

Commit 670d033

Browse files
author
mackenziekira
authored
Actually clear file names from intent
Rather than setting module-level `isClear` boolean, which would only allow the app to receive & respond to one share. This change prevents the issue on Android of the app 1) receives a share intent, 2) user then opens photo picker, causing app to go to bg and back to fg, 3) triggers share sheet to reopen, because original share intent info has not been properly cleared ajith-ab/react-native-receive-sharing-intent#110 (comment)
1 parent 68f43cf commit 670d033

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ReceiveSharingIntent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ReceiveSharingIntentModule implements IReceiveSharingIntent {
3333
}
3434

3535
clearReceivedFiles(){
36-
this.isClear = true;
36+
ReceiveSharingIntent.clearFileNames();
3737
}
3838

3939

@@ -54,4 +54,4 @@ class ReceiveSharingIntentModule implements IReceiveSharingIntent {
5454

5555
}
5656

57-
export default ReceiveSharingIntentModule;
57+
export default ReceiveSharingIntentModule;

0 commit comments

Comments
 (0)