mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 06:31:52 +01:00
Remove redundant Downloader isNotification argument (#9139)
DownloadQueue.clear() already sets QUEUE downloads to NOT_DOWNLOADED.
This commit is contained in:
parent
84a0044d51
commit
83a4e34095
@ -75,11 +75,9 @@ class DownloadManager(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Empties the download queue.
|
* Empties the download queue.
|
||||||
*
|
|
||||||
* @param isNotification value that determines if status is set (needed for view updates)
|
|
||||||
*/
|
*/
|
||||||
fun clearQueue(isNotification: Boolean = false) {
|
fun clearQueue() {
|
||||||
downloader.clearQueue(isNotification)
|
downloader.clearQueue()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -185,18 +185,10 @@ class Downloader(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes everything from the queue.
|
* Removes everything from the queue.
|
||||||
*
|
|
||||||
* @param isNotification value that determines if status is set (needed for view updates)
|
|
||||||
*/
|
*/
|
||||||
fun clearQueue(isNotification: Boolean = false) {
|
fun clearQueue() {
|
||||||
destroySubscriptions()
|
destroySubscriptions()
|
||||||
|
|
||||||
// Needed to update the chapter view
|
|
||||||
if (isNotification) {
|
|
||||||
queue
|
|
||||||
.filter { it.status == Download.State.QUEUE }
|
|
||||||
.forEach { it.status = Download.State.NOT_DOWNLOADED }
|
|
||||||
}
|
|
||||||
queue.clear()
|
queue.clear()
|
||||||
notifier.dismissProgress()
|
notifier.dismissProgress()
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class NotificationReceiver : BroadcastReceiver() {
|
|||||||
downloadManager.pauseDownloads()
|
downloadManager.pauseDownloads()
|
||||||
}
|
}
|
||||||
// Clear the download queue
|
// Clear the download queue
|
||||||
ACTION_CLEAR_DOWNLOADS -> downloadManager.clearQueue(true)
|
ACTION_CLEAR_DOWNLOADS -> downloadManager.clearQueue()
|
||||||
// Launch share activity and dismiss notification
|
// Launch share activity and dismiss notification
|
||||||
ACTION_SHARE_IMAGE ->
|
ACTION_SHARE_IMAGE ->
|
||||||
shareImage(
|
shareImage(
|
||||||
|
Loading…
Reference in New Issue
Block a user