mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 04:15:09 +01:00
Add "Move all chapters from series to top" option to download context menu (#6794)
* Added basic move to top series feature * Remove intermediate List * Change text string * Remove spanish manual translation * Changed algorithm to use "partition"
This commit is contained in:
parent
f8eb9f94f4
commit
3aa4e6eb93
@ -366,6 +366,14 @@ class DownloadController :
|
||||
}
|
||||
presenter.reorder(newDownloads)
|
||||
}
|
||||
R.id.move_to_top_series -> {
|
||||
val (selectedSeries, otherSeries) = adapter?.currentItems
|
||||
?.filterIsInstance<DownloadItem>()
|
||||
?.map(DownloadItem::download)
|
||||
?.partition { item.download.manga.id == it.manga.id }
|
||||
?: Pair(listOf<Download>(), listOf<Download>())
|
||||
presenter.reorder(selectedSeries + otherSeries)
|
||||
}
|
||||
R.id.cancel_download -> {
|
||||
presenter.cancelDownload(item.download)
|
||||
}
|
||||
|
@ -5,6 +5,10 @@
|
||||
android:id="@+id/move_to_top"
|
||||
android:title="@string/action_move_to_top" />
|
||||
|
||||
<item
|
||||
android:id="@+id/move_to_top_series"
|
||||
android:title="@string/action_move_to_top_all_for_series" />
|
||||
|
||||
<item
|
||||
android:id="@+id/move_to_bottom"
|
||||
android:title="@string/action_move_to_bottom" />
|
||||
|
@ -114,6 +114,7 @@
|
||||
<string name="action_asc">Ascending</string>
|
||||
<string name="action_desc">Descending</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_bottom">Move to bottom</string>
|
||||
<string name="action_install">Install</string>
|
||||
<string name="action_share">Share</string>
|
||||
|
Loading…
Reference in New Issue
Block a user