Explicitly dismiss progress notification on downloader stop

(cherry picked from commit 095461e31b969adacd74cc981be19ecb43b9b86b)
This commit is contained in:
arkon 2020-08-03 11:15:33 -04:00 committed by Jobobby04
parent a5e1f92b05
commit d07dbee9b0
2 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ internal class DownloadNotifier(private val context: Context) {
* Dismiss the downloader's notification. Downloader error notifications use a different id, so * Dismiss the downloader's notification. Downloader error notifications use a different id, so
* those can only be dismissed by the user. * those can only be dismissed by the user.
*/ */
fun dismiss() { fun dismissProgress() {
context.notificationManager.cancel(Notifications.ID_DOWNLOAD_CHAPTER_PROGRESS) context.notificationManager.cancel(Notifications.ID_DOWNLOAD_CHAPTER_PROGRESS)
} }

View File

@ -139,6 +139,7 @@ class Downloader(
notifier.paused = false notifier.paused = false
notifier.onPaused() notifier.onPaused()
} else { } else {
notifier.dismissProgress()
notifier.onComplete() notifier.onComplete()
} }
} }
@ -170,7 +171,7 @@ class Downloader(
.forEach { it.status = Download.NOT_DOWNLOADED } .forEach { it.status = Download.NOT_DOWNLOADED }
} }
queue.clear() queue.clear()
notifier.dismiss() notifier.dismissProgress()
} }
/** /**