mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-10 19:18:56 +01:00
[Download Queue] Move series to bottom (#9918)
Added item in download queue page to move series to bottom
This commit is contained in:
@@ -84,13 +84,17 @@ class DownloadQueueScreenModel(
|
||||
}
|
||||
reorder(newDownloads)
|
||||
}
|
||||
R.id.move_to_top_series -> {
|
||||
R.id.move_to_top_series, R.id.move_to_bottom_series -> {
|
||||
val (selectedSeries, otherSeries) = adapter?.currentItems
|
||||
?.filterIsInstance<DownloadItem>()
|
||||
?.map(DownloadItem::download)
|
||||
?.partition { item.download.manga.id == it.manga.id }
|
||||
?: Pair(emptyList(), emptyList())
|
||||
reorder(selectedSeries + otherSeries)
|
||||
if (menuItem.itemId == R.id.move_to_top_series) {
|
||||
reorder(selectedSeries + otherSeries)
|
||||
} else {
|
||||
reorder(otherSeries + selectedSeries)
|
||||
}
|
||||
}
|
||||
R.id.cancel_download -> {
|
||||
cancel(listOf(item.download))
|
||||
|
||||
Reference in New Issue
Block a user