Move edit categories to overflow
(cherry picked from commit 88ee86b7ef)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt
# app/src/main/res/menu/chapters.xml
This commit is contained in:
@@ -337,7 +337,8 @@ class MangaController :
|
||||
// Hide download options for local manga
|
||||
menu.findItem(R.id.download_group).isVisible = !isLocalSource
|
||||
|
||||
// Hide edit cover and migrate options for non-library manga
|
||||
// Hide options for non-library manga
|
||||
menu.findItem(R.id.action_edit_categories).isVisible = presenter.manga.favorite && presenter.getCategories().isNotEmpty()
|
||||
/* SY --> menu.findItem(R.id.action_edit_cover).isVisible = presenter.manga.favorite SY <-- */
|
||||
/* SY --> menu.findItem(R.id.action_migrate).isVisible = presenter.manga.favorite SY <-- */
|
||||
|
||||
@@ -411,6 +412,7 @@ class MangaController :
|
||||
}
|
||||
// SY <--
|
||||
|
||||
R.id.action_edit_categories -> onCategoriesClick()
|
||||
// SY --> R.id.action_edit_cover -> handleChangeCover() // SY <--
|
||||
// SY --> R.id.action_migrate -> migrateManga() // SY <--
|
||||
}
|
||||
@@ -643,7 +645,7 @@ class MangaController :
|
||||
mangaInfoAdapter?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun onCategoriesClick() {
|
||||
private fun onCategoriesClick() {
|
||||
val manga = presenter.manga
|
||||
val categories = presenter.getCategories()
|
||||
|
||||
|
||||
@@ -107,16 +107,6 @@ class MangaInfoHeaderAdapter(
|
||||
binding.btnTracking.gone()
|
||||
}
|
||||
|
||||
if (controller.presenter.manga.favorite && controller.presenter.getCategories().isNotEmpty()) {
|
||||
binding.btnCategories.visible()
|
||||
binding.btnCategories.clicks()
|
||||
.onEach { controller.onCategoriesClick() }
|
||||
.launchIn(scope)
|
||||
binding.btnCategories.setTooltip(R.string.action_move_category)
|
||||
} else {
|
||||
binding.btnCategories.gone()
|
||||
}
|
||||
|
||||
if (controller.presenter.source is HttpSource) {
|
||||
binding.btnWebview.visible()
|
||||
binding.btnWebview.clicks()
|
||||
@@ -366,8 +356,6 @@ class MangaInfoHeaderAdapter(
|
||||
initialLoad = false
|
||||
}
|
||||
}
|
||||
|
||||
binding.btnCategories.visibleIf { manga.favorite && controller.presenter.getCategories().isNotEmpty() }
|
||||
}
|
||||
|
||||
private fun showMangaInfo(visible: Boolean) {
|
||||
|
||||
Reference in New Issue
Block a user