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

Commit 7d79cb0

Browse files
author
Elad Gil
committed
fixed typo in expectedBytes
1 parent 318a54e commit 7d79cb0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

android/src/main/java/com/eko/RNBackgroundDownloadModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public void onProgress(Download download, long l, long l1) {
264264
params.putString("id", config.id);
265265

266266
if (!config.reportedBegin) {
267-
params.putInt("expctedBytes", (int)download.getTotal());
267+
params.putInt("expectedBytes", (int)download.getTotal());
268268
ee.emit("downloadBegin", params);
269269
config.reportedBegin = true;
270270
} else {

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RNBackgroundDownloadEmitter.addListener('downloadFailed', event => {
3333
RNBackgroundDownloadEmitter.addListener('downloadBegin', event => {
3434
let task = tasksMap.get(event.id);
3535
if (task) {
36-
task._onBegin(event.expctedBytes);
36+
task._onBegin(event.expectedBytes);
3737
}
3838
});
3939

ios/RNBackgroundDownload.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTas
211211
RNBGDTaskConfig *taskCofig = taskToConfigMap[downloadTask];
212212
if (taskCofig != nil) {
213213
if (!taskCofig.reportedBegin) {
214-
[self sendEventWithName:@"downloadBegin" body:@{@"id": taskCofig.id, @"expctedBytes": [NSNumber numberWithLongLong: totalBytesExpectedToWrite]}];
214+
[self sendEventWithName:@"downloadBegin" body:@{@"id": taskCofig.id, @"expectedBytes": [NSNumber numberWithLongLong: totalBytesExpectedToWrite]}];
215215
urlToConfigMap[downloadTask.currentRequest.URL.absoluteString] = taskCofig;
216216
[[NSUserDefaults standardUserDefaults] setObject:[self serialize: urlToConfigMap] forKey:URL_TO_CONFIG_MAP_KEY];
217217
taskCofig.reportedBegin = YES;

0 commit comments

Comments
 (0)