update download manager module setOngoing calls for notifications
This commit is contained in:
parent
bae94869fa
commit
7c8a5c2c00
3 changed files with 7 additions and 3 deletions
|
@ -75189,6 +75189,8 @@ __d(function (global, require, module, exports, _dependencyMap) {
|
||||||
});
|
});
|
||||||
|
|
||||||
_reactNative.NativeModules.LbryDownloadManager.stopDownload(uri, fileInfo.file_name);
|
_reactNative.NativeModules.LbryDownloadManager.stopDownload(uri, fileInfo.file_name);
|
||||||
|
|
||||||
|
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75390,6 +75392,7 @@ __d(function (global, require, module, exports, _dependencyMap) {
|
||||||
});
|
});
|
||||||
}, _this.onStopDownloadPressed = function () {
|
}, _this.onStopDownloadPressed = function () {
|
||||||
var _this$props2 = _this.props,
|
var _this$props2 = _this.props,
|
||||||
|
deleteFile = _this$props2.deleteFile,
|
||||||
stopDownload = _this$props2.stopDownload,
|
stopDownload = _this$props2.stopDownload,
|
||||||
fileInfo = _this$props2.fileInfo,
|
fileInfo = _this$props2.fileInfo,
|
||||||
navigation = _this$props2.navigation;
|
navigation = _this$props2.navigation;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
”;9―V•0Ο\3yQoίψ‹Ξs
|
+]ח~wֳהש|דב/<05>ב²€/ֽ
|
|
@ -49,8 +49,7 @@ public class DownloadManagerModule extends ReactContextBaseJavaModule {
|
||||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
|
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
|
||||||
builder.setContentTitle(String.format("Downloading %s...", fileName))
|
builder.setContentTitle(String.format("Downloading %s...", fileName))
|
||||||
.setSmallIcon(R.drawable.ic_file_download_black_24dp)
|
.setSmallIcon(R.drawable.ic_file_download_black_24dp)
|
||||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
.setPriority(NotificationCompat.PRIORITY_LOW);
|
||||||
.setOngoing(true);
|
|
||||||
|
|
||||||
builder.setProgress(MAX_PROGRESS, 0, false);
|
builder.setProgress(MAX_PROGRESS, 0, false);
|
||||||
|
|
||||||
|
@ -99,6 +98,8 @@ public class DownloadManagerModule extends ReactContextBaseJavaModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
|
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
|
||||||
|
NotificationCompat.Builder builder = builders.get(notificationId);
|
||||||
|
builder.setOngoing(false);
|
||||||
notificationManager.cancel(notificationId);
|
notificationManager.cancel(notificationId);
|
||||||
|
|
||||||
downloadIdNotificationIdMap.remove(id);
|
downloadIdNotificationIdMap.remove(id);
|
||||||
|
|
Loading…
Reference in a new issue