diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersController.kt
index 759beddd7d..46c60707e3 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersController.kt
@@ -227,6 +227,7 @@ class MangaInfoChaptersController(private val fromSource: Boolean = false) :
else -> throw NotImplementedError("Unimplemented sorting method")
}
menu.findItem(sortingItem).isChecked = true
+ menu.findItem(R.id.action_sort_descending).isChecked = presenter.manga.sortDescending()
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
@@ -252,6 +253,10 @@ class MangaInfoChaptersController(private val fromSource: Boolean = false) :
item.isChecked = true
presenter.setSorting(Manga.SORTING_UPLOAD_DATE)
}
+ R.id.action_sort_descending -> {
+ presenter.reverseSortOrder()
+ activity?.invalidateOptionsMenu()
+ }
R.id.download_next, R.id.download_next_5, R.id.download_next_10,
R.id.download_custom, R.id.download_unread, R.id.download_all
@@ -281,7 +286,6 @@ class MangaInfoChaptersController(private val fromSource: Boolean = false) :
presenter.removeFilters()
activity?.invalidateOptionsMenu()
}
- R.id.action_sort -> presenter.revertSortOrder()
R.id.action_migrate -> migrateManga()
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersPresenter.kt
index 42a01bf200..72cfc7bc26 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersPresenter.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoChaptersPresenter.kt
@@ -441,7 +441,7 @@ class MangaInfoChaptersPresenter(
/**
* Reverses the sorting and requests an UI update.
*/
- fun revertSortOrder() {
+ fun reverseSortOrder() {
manga.setChapterOrder(if (sortDescending()) Manga.SORT_ASC else Manga.SORT_DESC)
db.updateFlags(manga).executeAsBlocking()
refreshChapters()
diff --git a/app/src/main/res/drawable/ic_sort_24dp.xml b/app/src/main/res/drawable/ic_sort_24dp.xml
new file mode 100644
index 0000000000..28b2c9ecb5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_sort_24dp.xml
@@ -0,0 +1,10 @@
+