mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-04 08:55:06 +01:00
fix bug in download page that caused reorder to start the queue
This commit is contained in:
parent
7ad1dd8ee6
commit
10919cc338
@ -99,11 +99,14 @@ class DownloadManager(context: Context) {
|
||||
* @param downloads value to set the download queue to
|
||||
*/
|
||||
fun reorderQueue(downloads: List<Download>) {
|
||||
val wasPaused = downloader.isPaused()
|
||||
downloader.pause()
|
||||
downloader.queue.clear()
|
||||
downloader.queue.addAll(downloads)
|
||||
if(!wasPaused){
|
||||
downloader.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -144,6 +144,11 @@ class Downloader(
|
||||
notifier.paused = true
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if downloader is paused
|
||||
*/
|
||||
fun isPaused() = !isRunning
|
||||
|
||||
/**
|
||||
* Removes everything from the queue.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user