Long press favorite button to manage categories
(cherry picked from commit fff0f841fa159b442af87625a29cbc3200dd59f2)
This commit is contained in:
parent
fa580aa3c9
commit
29ad0e091f
2 changed files with 7 additions and 1 deletions
|
|
@ -645,7 +645,7 @@ class MangaController :
|
||||||
mangaInfoAdapter?.notifyDataSetChanged()
|
mangaInfoAdapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onCategoriesClick() {
|
fun onCategoriesClick() {
|
||||||
val manga = presenter.manga
|
val manga = presenter.manga
|
||||||
val categories = presenter.getCategories()
|
val categories = presenter.getCategories()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,12 @@ class MangaInfoHeaderAdapter(
|
||||||
.onEach { controller.onFavoriteClick() }
|
.onEach { controller.onFavoriteClick() }
|
||||||
.launchIn(scope)
|
.launchIn(scope)
|
||||||
|
|
||||||
|
if (controller.presenter.manga.favorite && controller.presenter.getCategories().isNotEmpty()) {
|
||||||
|
binding.btnFavorite.longClicks()
|
||||||
|
.onEach { controller.onCategoriesClick() }
|
||||||
|
.launchIn(scope)
|
||||||
|
}
|
||||||
|
|
||||||
if (controller.presenter.manga.favorite && Injekt.get<TrackManager>().hasLoggedServices()) {
|
if (controller.presenter.manga.favorite && Injekt.get<TrackManager>().hasLoggedServices()) {
|
||||||
binding.btnTracking.visible()
|
binding.btnTracking.visible()
|
||||||
binding.btnTracking.clicks()
|
binding.btnTracking.clicks()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue