mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 03:21:51 +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:
parent
26c5d761da
commit
3d0e750519
@ -84,13 +84,17 @@ class DownloadQueueScreenModel(
|
|||||||
}
|
}
|
||||||
reorder(newDownloads)
|
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
|
val (selectedSeries, otherSeries) = adapter?.currentItems
|
||||||
?.filterIsInstance<DownloadItem>()
|
?.filterIsInstance<DownloadItem>()
|
||||||
?.map(DownloadItem::download)
|
?.map(DownloadItem::download)
|
||||||
?.partition { item.download.manga.id == it.manga.id }
|
?.partition { item.download.manga.id == it.manga.id }
|
||||||
?: Pair(emptyList(), emptyList())
|
?: 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 -> {
|
R.id.cancel_download -> {
|
||||||
cancel(listOf(item.download))
|
cancel(listOf(item.download))
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
android:id="@+id/move_to_bottom"
|
android:id="@+id/move_to_bottom"
|
||||||
android:title="@string/action_move_to_bottom" />
|
android:title="@string/action_move_to_bottom" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/move_to_bottom_series"
|
||||||
|
android:title="@string/action_move_to_bottom_all_for_series" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cancel_download"
|
android:id="@+id/cancel_download"
|
||||||
android:title="@string/action_cancel" />
|
android:title="@string/action_cancel" />
|
||||||
|
@ -137,6 +137,7 @@
|
|||||||
<string name="action_move_to_top">Move to top</string>
|
<string name="action_move_to_top">Move to top</string>
|
||||||
<string name="action_move_to_top_all_for_series">Move series to top</string>
|
<string name="action_move_to_top_all_for_series">Move series to top</string>
|
||||||
<string name="action_move_to_bottom">Move to bottom</string>
|
<string name="action_move_to_bottom">Move to bottom</string>
|
||||||
|
<string name="action_move_to_bottom_all_for_series">Move series to bottom</string>
|
||||||
<string name="action_install">Install</string>
|
<string name="action_install">Install</string>
|
||||||
<string name="action_share">Share</string>
|
<string name="action_share">Share</string>
|
||||||
<string name="action_save">Save</string>
|
<string name="action_save">Save</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user