Single suggestion more button intent

pull/421/head
Zakhar Timoshenko 3 years ago
parent b2817a2ce7
commit 80db817ff2

@ -105,7 +105,7 @@ class ExploreFragment :
R.id.button_history -> HistoryActivity.newIntent(v.context) R.id.button_history -> HistoryActivity.newIntent(v.context)
R.id.button_local -> MangaListActivity.newIntent(v.context, MangaSource.LOCAL) R.id.button_local -> MangaListActivity.newIntent(v.context, MangaSource.LOCAL)
R.id.button_bookmarks -> BookmarksActivity.newIntent(v.context) 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_favourites -> FavouriteCategoriesActivity.newIntent(v.context)
//R.id.button_random -> { //R.id.button_random -> {
// viewModel.openRandom() // viewModel.openRandom()

@ -17,7 +17,7 @@ class ExploreAdapter(
delegatesManager delegatesManager
.addDelegate(ITEM_TYPE_BUTTONS, exploreButtonsAD(listener)) .addDelegate(ITEM_TYPE_BUTTONS, exploreButtonsAD(listener))
.addDelegate(ITEM_TYPE_RECOMMENDATION_HEADER, exploreRecommendationHeaderAD()) .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_HEADER, exploreSourcesHeaderAD(listener))
.addDelegate(ITEM_TYPE_SOURCE_LIST, exploreSourceListItemAD(coil, clickListener, lifecycleOwner)) .addDelegate(ITEM_TYPE_SOURCE_LIST, exploreSourceListItemAD(coil, clickListener, lifecycleOwner))
.addDelegate(ITEM_TYPE_SOURCE_GRID, exploreSourceGridItemAD(coil, clickListener, lifecycleOwner)) .addDelegate(ITEM_TYPE_SOURCE_GRID, exploreSourceGridItemAD(coil, clickListener, lifecycleOwner))

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

Loading…
Cancel
Save