Rocket.Chat.ReactNative/patches/rn-fetch-blob+0.12.0.patch

25 lines
1.0 KiB
Diff
Raw Normal View History

2023-07-12 19:05:51 +00:00
diff --git a/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java b/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
index 602d51d..920d975 100644
--- a/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
+++ b/node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
@@ -38,7 +38,7 @@ import static com.RNFetchBlob.RNFetchBlobConst.GET_CONTENT_INTENT;
public class RNFetchBlob extends ReactContextBaseJavaModule {
- private final OkHttpClient mClient;
+ static private OkHttpClient mClient;
static ReactApplicationContext RCTContext;
private static LinkedBlockingQueue<Runnable> taskQueue = new LinkedBlockingQueue<>();
@@ -75,6 +75,10 @@ public class RNFetchBlob extends ReactContextBaseJavaModule {
});
}
+ public static void applyCustomOkHttpClient(OkHttpClient client) {
+ mClient = client;
+ }
+
@Override
public String getName() {
return "RNFetchBlob";