diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt index 9768fda63a..fac8963516 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt @@ -157,6 +157,17 @@ class DownloadController : val downloads = items.mapNotNull { it.download } presenter.reorder(downloads) } + R.id.bigest, R.id.smallest -> { + val adapter = adapter ?: return false + val items = adapter.currentItems.sortedBy { it.download.chapter.chapter_number } + .toMutableList() + if (item.itemId == R.id.bigest) { + items.reverse() + } + adapter.updateDataSet(items) + val downloads = items.mapNotNull { it.download } + presenter.reorder(downloads) + } } return super.onOptionsItemSelected(item) } diff --git a/app/src/main/res/menu/download_queue.xml b/app/src/main/res/menu/download_queue.xml index 799cdfe2c3..b400bb8501 100644 --- a/app/src/main/res/menu/download_queue.xml +++ b/app/src/main/res/menu/download_queue.xml @@ -8,11 +8,31 @@ app:showAsAction="never">
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5048277ee5..cb021c9eb3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -103,8 +103,12 @@