Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit dd230a6

Browse files
committed
Remove improper aguments
1 parent b54f0f5 commit dd230a6

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

android/.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/src/main/java/com/RNFetchBlob/RNFetchBlob.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public String getName() {
4141
}
4242

4343
@ReactMethod
44-
public void fetchBlob(String method, String url, ReadableMap headers, String body, final Callback callback, final Callback progressEventHandler) {
44+
public void fetchBlob(String method, String url, ReadableMap headers, String body, final Callback callback) {
4545

4646
try {
4747
Uri uri = Uri.parse(url);
@@ -71,7 +71,7 @@ public void fetchBlob(String method, String url, ReadableMap headers, String bod
7171
}
7272

7373
// create handler
74-
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback, progressEventHandler);
74+
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback);
7575

7676
// send request
7777
switch(method.toLowerCase()) {
@@ -95,7 +95,7 @@ public void fetchBlob(String method, String url, ReadableMap headers, String bod
9595
}
9696

9797
@ReactMethod
98-
public void fetchBlobForm(String method, String url, ReadableMap headers, ReadableArray body, final Callback callback, final Callback progressEventHandler) {
98+
public void fetchBlobForm(String method, String url, ReadableMap headers, ReadableArray body, final Callback callback) {
9999

100100
try {
101101
Uri uri = Uri.parse(url);
@@ -154,7 +154,7 @@ public void fetchBlobForm(String method, String url, ReadableMap headers, Readab
154154
}
155155

156156
// create handler
157-
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback, progressEventHandler);
157+
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback);
158158

159159
// send request
160160
switch(method.toLowerCase()) {

android/src/main/java/com/RNFetchBlob/RNFetchBlobHandler.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
public class RNFetchBlobHandler extends AsyncHttpResponseHandler {
1010

1111
Callback onResponse;
12-
Callback onProgress;
1312

14-
RNFetchBlobHandler(Callback onResponse, Callback onProgress) {
13+
RNFetchBlobHandler(Callback onResponse) {
1514
this.onResponse = onResponse;
16-
this.onProgress = onProgress;
1715
}
1816

1917
@Override
@@ -25,9 +23,6 @@ public void onSuccess(int statusCode, Header[] headers, byte[] binaryData) {
2523
@Override
2624
public void onProgress(long bytesWritten, long totalSize) {
2725
super.onProgress(bytesWritten, totalSize);
28-
if(this.onProgress != null) {
29-
this.onProgress.invoke(bytesWritten, totalSize);
30-
}
3126
}
3227

3328
@Override

ios/RNFetchBlob.xcodeproj/project.pbxproj

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
};
66
objectVersion = 46;
77
objects = {
8-
98
/* Begin PBXBuildFile section */
109
A15C30141CD25C330074CB35 /* RNFetchBlob.m in Sources */ = {isa = PBXBuildFile; fileRef = A15C30131CD25C330074CB35 /* RNFetchBlob.m */; };
1110
A166D1AA1CE0647A00273590 /* RNFetchBlob.h in Sources */ = {isa = PBXBuildFile; fileRef = A15C30111CD25C330074CB35 /* RNFetchBlob.h */; };
@@ -27,6 +26,7 @@
2726
A15C300E1CD25C330074CB35 /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFetchBlob.a; sourceTree = BUILT_PRODUCTS_DIR; };
2827
A15C30111CD25C330074CB35 /* RNFetchBlob.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFetchBlob.h; path = RNFetchBlob/RNFetchBlob.h; sourceTree = "<group>"; };
2928
A15C30131CD25C330074CB35 /* RNFetchBlob.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFetchBlob.m; path = RNFetchBlob/RNFetchBlob.m; sourceTree = "<group>"; };
29+
ADC1D945EE804D3DA47CF622 /* RNFetchBlob.xcodeproj */ = {isa = PBXFileReference; name = "RNFetchBlob.xcodeproj"; path = "../../node_modules/react-native-fetch-blob/ios/RNFetchBlob.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
3030
/* End PBXFileReference section */
3131

3232
/* Begin PBXFrameworksBuildPhase section */
@@ -46,6 +46,7 @@
4646
A15C30111CD25C330074CB35 /* RNFetchBlob.h */,
4747
A15C30131CD25C330074CB35 /* RNFetchBlob.m */,
4848
A15C300F1CD25C330074CB35 /* Products */,
49+
8BD9ABDFAF76406291A798F2 /* Libraries */,
4950
);
5051
sourceTree = "<group>";
5152
};
@@ -57,6 +58,15 @@
5758
name = Products;
5859
sourceTree = "<group>";
5960
};
61+
8BD9ABDFAF76406291A798F2 /* Libraries */ = {
62+
isa = PBXGroup;
63+
children = (
64+
ADC1D945EE804D3DA47CF622 /* RNFetchBlob.xcodeproj */,
65+
);
66+
name = Libraries;
67+
path = "";
68+
sourceTree = "<group>";
69+
};
6070
/* End PBXGroup section */
6171

6272
/* Begin PBXNativeTarget section */
@@ -83,7 +93,7 @@
8393
A15C30061CD25C330074CB35 /* Project object */ = {
8494
isa = PBXProject;
8595
attributes = {
86-
LastUpgradeCheck = 0730;
96+
LastUpgradeCheck = 730;
8797
ORGANIZATIONNAME = suzuri04x2;
8898
TargetAttributes = {
8999
A15C300D1CD25C330074CB35 = {
@@ -214,6 +224,7 @@
214224
"$(SRCROOT)/../../React/**",
215225
"$(SRCROOT)/../../react-native/React/**",
216226
"$(SRCROOT)/../../node_modules/react-native/React/**",
227+
"$(SRCROOT)/../../node_modules/react-native-fetch-blob/ios/RNFetchBlob",
217228
);
218229
OTHER_LDFLAGS = "-ObjC";
219230
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -232,6 +243,7 @@
232243
"$(SRCROOT)/../../React/**",
233244
"$(SRCROOT)/../../react-native/React/**",
234245
"$(SRCROOT)/../../node_modules/react-native/React/**",
246+
"$(SRCROOT)/../../node_modules/react-native-fetch-blob/ios/RNFetchBlob",
235247
);
236248
OTHER_LDFLAGS = "-ObjC";
237249
PRODUCT_NAME = "$(TARGET_NAME)";

0 commit comments

Comments
 (0)