mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 01:59:19 +01:00
Fix #545
This commit is contained in:
parent
4d4b9c0d6d
commit
2a531f1a1e
@ -61,6 +61,13 @@ class DownloadStore(context: Context) {
|
|||||||
preferences.edit().remove(getKey(download)).apply()
|
preferences.edit().remove(getKey(download)).apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all the downloads from the store.
|
||||||
|
*/
|
||||||
|
fun clear() {
|
||||||
|
preferences.edit().clear().apply()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the preference's key for the given download.
|
* Returns the preference's key for the given download.
|
||||||
*
|
*
|
||||||
@ -93,7 +100,7 @@ class DownloadStore(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clear the store, downloads will be added again immediately.
|
// Clear the store, downloads will be added again immediately.
|
||||||
preferences.edit().clear().apply()
|
clear()
|
||||||
return downloads
|
return downloads
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ class DownloadQueue(
|
|||||||
download.setStatusSubject(null)
|
download.setStatusSubject(null)
|
||||||
}
|
}
|
||||||
queue.clear()
|
queue.clear()
|
||||||
|
store.clear()
|
||||||
updatedRelay.call(Unit)
|
updatedRelay.call(Unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user