Stop download functionality #45
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);
|
||||
|
||||
dispatch(doDeleteFile(fileInfo.outpoint, uri));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -75390,6 +75392,7 @@ __d(function (global, require, module, exports, _dependencyMap) {
|
|||
});
|
||||
}, _this.onStopDownloadPressed = function () {
|
||||
var _this$props2 = _this.props,
|
||||
deleteFile = _this$props2.deleteFile,
|
||||
stopDownload = _this$props2.stopDownload,
|
||||
fileInfo = _this$props2.fileInfo,
|
||||
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);
|
||||
builder.setContentTitle(String.format("Downloading %s...", fileName))
|
||||
.setSmallIcon(R.drawable.ic_file_download_black_24dp)
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW)
|
||||
.setOngoing(true);
|
||||
.setPriority(NotificationCompat.PRIORITY_LOW);
|
||||
|
||||
builder.setProgress(MAX_PROGRESS, 0, false);
|
||||
|
||||
|
@ -99,6 +98,8 @@ public class DownloadManagerModule extends ReactContextBaseJavaModule {
|
|||
}
|
||||
|
||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
|
||||
NotificationCompat.Builder builder = builders.get(notificationId);
|
||||
builder.setOngoing(false);
|
||||
notificationManager.cancel(notificationId);
|
||||
|
||||
downloadIdNotificationIdMap.remove(id);
|
||||
|
|
Loading…
Reference in a new issue