Single suggestion more button intent

This commit is contained in:
Zakhar Timoshenko
2023-07-02 15:59:42 +03:00
parent b2817a2ce7
commit 80db817ff2
3 changed files with 5 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ class ExploreFragment :
R.id.button_history -> HistoryActivity.newIntent(v.context)
R.id.button_local -> MangaListActivity.newIntent(v.context, MangaSource.LOCAL)
R.id.button_bookmarks -> BookmarksActivity.newIntent(v.context)
//R.id.button_suggestions -> SuggestionsActivity.newIntent(v.context)
R.id.button_more -> SuggestionsActivity.newIntent(v.context)
R.id.button_favourites -> FavouriteCategoriesActivity.newIntent(v.context)
//R.id.button_random -> {
// viewModel.openRandom()

View File

@@ -17,7 +17,7 @@ class ExploreAdapter(
delegatesManager
.addDelegate(ITEM_TYPE_BUTTONS, exploreButtonsAD(listener))
.addDelegate(ITEM_TYPE_RECOMMENDATION_HEADER, exploreRecommendationHeaderAD())
.addDelegate(ITEM_TYPE_RECOMMENDATION, exploreRecommendationItemAD(coil, lifecycleOwner))
.addDelegate(ITEM_TYPE_RECOMMENDATION, exploreRecommendationItemAD(coil, listener, lifecycleOwner))
.addDelegate(ITEM_TYPE_HEADER, exploreSourcesHeaderAD(listener))
.addDelegate(ITEM_TYPE_SOURCE_LIST, exploreSourceListItemAD(coil, clickListener, lifecycleOwner))
.addDelegate(ITEM_TYPE_SOURCE_GRID, exploreSourceGridItemAD(coil, clickListener, lifecycleOwner))

View File

@@ -55,11 +55,14 @@ fun exploreRecommendationHeaderAD() = adapterDelegateViewBinding<ExploreItem.Hea
fun exploreRecommendationItemAD(
coil: ImageLoader,
clickListener: View.OnClickListener,
lifecycleOwner: LifecycleOwner,
) = adapterDelegateViewBinding<ExploreItem.Recommendation, ExploreItem, ItemRecommendationBinding>(
{ layoutInflater, parent -> ItemRecommendationBinding.inflate(layoutInflater, parent, false) }
) {
binding.buttonMore.setOnClickListener(clickListener)
bind {
binding.textViewTitle.text = item.manga.title
binding.textViewSubtitle.text = item.manga.title