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

Commit

Permalink
Remove improper aguments
Browse files Browse the repository at this point in the history
  • Loading branch information
wkh237 committed May 19, 2016
1 parent b54f0f5 commit dd230a6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String getName() {
}

@ReactMethod
public void fetchBlob(String method, String url, ReadableMap headers, String body, final Callback callback, final Callback progressEventHandler) {
public void fetchBlob(String method, String url, ReadableMap headers, String body, final Callback callback) {

try {
Uri uri = Uri.parse(url);
Expand Down Expand Up @@ -71,7 +71,7 @@ public void fetchBlob(String method, String url, ReadableMap headers, String bod
}

// create handler
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback, progressEventHandler);
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback);

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

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

try {
Uri uri = Uri.parse(url);
Expand Down Expand Up @@ -154,7 +154,7 @@ public void fetchBlobForm(String method, String url, ReadableMap headers, Readab
}

// create handler
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback, progressEventHandler);
AsyncHttpResponseHandler handler = new RNFetchBlobHandler(callback);

// send request
switch(method.toLowerCase()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
public class RNFetchBlobHandler extends AsyncHttpResponseHandler {

Callback onResponse;
Callback onProgress;

RNFetchBlobHandler(Callback onResponse, Callback onProgress) {
RNFetchBlobHandler(Callback onResponse) {
this.onResponse = onResponse;
this.onProgress = onProgress;
}

@Override
Expand All @@ -25,9 +23,6 @@ public void onSuccess(int statusCode, Header[] headers, byte[] binaryData) {
@Override
public void onProgress(long bytesWritten, long totalSize) {
super.onProgress(bytesWritten, totalSize);
if(this.onProgress != null) {
this.onProgress.invoke(bytesWritten, totalSize);
}
}

@Override
Expand Down
16 changes: 14 additions & 2 deletions ios/RNFetchBlob.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
A15C30141CD25C330074CB35 /* RNFetchBlob.m in Sources */ = {isa = PBXBuildFile; fileRef = A15C30131CD25C330074CB35 /* RNFetchBlob.m */; };
A166D1AA1CE0647A00273590 /* RNFetchBlob.h in Sources */ = {isa = PBXBuildFile; fileRef = A15C30111CD25C330074CB35 /* RNFetchBlob.h */; };
Expand All @@ -27,6 +26,7 @@
A15C300E1CD25C330074CB35 /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFetchBlob.a; sourceTree = BUILT_PRODUCTS_DIR; };
A15C30111CD25C330074CB35 /* RNFetchBlob.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFetchBlob.h; path = RNFetchBlob/RNFetchBlob.h; sourceTree = "<group>"; };
A15C30131CD25C330074CB35 /* RNFetchBlob.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFetchBlob.m; path = RNFetchBlob/RNFetchBlob.m; sourceTree = "<group>"; };
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; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -46,6 +46,7 @@
A15C30111CD25C330074CB35 /* RNFetchBlob.h */,
A15C30131CD25C330074CB35 /* RNFetchBlob.m */,
A15C300F1CD25C330074CB35 /* Products */,
8BD9ABDFAF76406291A798F2 /* Libraries */,
);
sourceTree = "<group>";
};
Expand All @@ -57,6 +58,15 @@
name = Products;
sourceTree = "<group>";
};
8BD9ABDFAF76406291A798F2 /* Libraries */ = {
isa = PBXGroup;
children = (
ADC1D945EE804D3DA47CF622 /* RNFetchBlob.xcodeproj */,
);
name = Libraries;
path = "";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -83,7 +93,7 @@
A15C30061CD25C330074CB35 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 730;
ORGANIZATIONNAME = suzuri04x2;
TargetAttributes = {
A15C300D1CD25C330074CB35 = {
Expand Down Expand Up @@ -214,6 +224,7 @@
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../node_modules/react-native/React/**",
"$(SRCROOT)/../../node_modules/react-native-fetch-blob/ios/RNFetchBlob",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -232,6 +243,7 @@
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/../../node_modules/react-native/React/**",
"$(SRCROOT)/../../node_modules/react-native-fetch-blob/ios/RNFetchBlob",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

0 comments on commit dd230a6

Please sign in to comment.