mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-23 16:36:37 +03:00
72 lines
2.9 KiB
Diff
72 lines
2.9 KiB
Diff
diff --git a/node_modules/react-native-receive-sharing-intent/android/build.gradle b/node_modules/react-native-receive-sharing-intent/android/build.gradle
|
|
index 02cc8f2..6adbabd 100644
|
|
--- a/node_modules/react-native-receive-sharing-intent/android/build.gradle
|
|
+++ b/node_modules/react-native-receive-sharing-intent/android/build.gradle
|
|
@@ -4,7 +4,7 @@ buildscript {
|
|
|
|
repositories {
|
|
google()
|
|
- jcenter()
|
|
+ mavenCentral() //patched
|
|
}
|
|
|
|
dependencies {
|
|
@@ -52,7 +52,6 @@ android {
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
- jcenter()
|
|
google()
|
|
|
|
def found = false
|
|
diff --git a/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java b/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
|
|
index f752144..c9be5d2 100644
|
|
--- a/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
|
|
+++ b/node_modules/react-native-receive-sharing-intent/android/src/main/java/com/reactnativereceivesharingintent/ReceiveSharingIntentModule.java
|
|
@@ -18,18 +18,21 @@ public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule {
|
|
|
|
private final ReactApplicationContext reactContext;
|
|
private ReceiveSharingIntentHelper receiveSharingIntentHelper;
|
|
+ private Intent oldIntent;
|
|
|
|
public ReceiveSharingIntentModule(ReactApplicationContext reactContext) {
|
|
super(reactContext);
|
|
this.reactContext = reactContext;
|
|
Application applicationContext = (Application) reactContext.getApplicationContext();
|
|
receiveSharingIntentHelper = new ReceiveSharingIntentHelper(applicationContext);
|
|
+
|
|
}
|
|
|
|
|
|
protected void onNewIntent(Intent intent) {
|
|
Activity mActivity = getCurrentActivity();
|
|
if(mActivity == null) { return; }
|
|
+ oldIntent = mActivity.getIntent();
|
|
mActivity.setIntent(intent);
|
|
}
|
|
|
|
@@ -40,7 +43,9 @@ public class ReceiveSharingIntentModule extends ReactContextBaseJavaModule {
|
|
if(mActivity == null) { return; }
|
|
Intent intent = mActivity.getIntent();
|
|
receiveSharingIntentHelper.sendFileNames(reactContext, intent, promise);
|
|
- mActivity.setIntent(null);
|
|
+ if (oldIntent != null) {
|
|
+ mActivity.setIntent(oldIntent);
|
|
+ }
|
|
}
|
|
|
|
@ReactMethod
|
|
diff --git a/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts b/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
|
|
index 735c191..91dab4b 100644
|
|
--- a/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
|
|
+++ b/node_modules/react-native-receive-sharing-intent/src/ReceiveSharingIntent.ts
|
|
@@ -33,7 +33,7 @@ class ReceiveSharingIntentModule implements IReceiveSharingIntent {
|
|
}
|
|
|
|
clearReceivedFiles(){
|
|
- this.isClear = true;
|
|
+ ReceiveSharingIntent.clearFileNames();
|
|
}
|
|
|
|
|