mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:15:14 +01:00
Merge pull request #30 from CarlosEsco/reorderFix
fix bug in download page that causes reorder to start the queue
This commit is contained in:
commit
5cfb3b3b6e
@ -99,10 +99,13 @@ 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)
|
||||
downloader.start()
|
||||
if(!wasPaused){
|
||||
downloader.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,6 +145,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