|
@@ -8,9 +8,9 @@ import eu.kanade.tachiyomi.data.glide.toMangaThumbnail
|
|
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
|
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
|
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
|
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
|
import kotlinx.android.synthetic.main.global_search_controller_card_item.card
|
|
import kotlinx.android.synthetic.main.global_search_controller_card_item.card
|
|
-import kotlinx.android.synthetic.main.global_search_controller_card_item.itemImage
|
|
|
|
|
|
+import kotlinx.android.synthetic.main.global_search_controller_card_item.cover
|
|
import kotlinx.android.synthetic.main.global_search_controller_card_item.progress
|
|
import kotlinx.android.synthetic.main.global_search_controller_card_item.progress
|
|
-import kotlinx.android.synthetic.main.global_search_controller_card_item.tvTitle
|
|
|
|
|
|
+import kotlinx.android.synthetic.main.global_search_controller_card_item.title
|
|
|
|
|
|
class GlobalSearchCardHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
|
class GlobalSearchCardHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
|
BaseFlexibleViewHolder(view, adapter) {
|
|
BaseFlexibleViewHolder(view, adapter) {
|
|
@@ -35,15 +35,15 @@ class GlobalSearchCardHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
|
fun bind(manga: Manga) {
|
|
fun bind(manga: Manga) {
|
|
card.clipToOutline = true
|
|
card.clipToOutline = true
|
|
|
|
|
|
- tvTitle.text = manga.title
|
|
|
|
|
|
+ title.text = manga.title
|
|
// Set alpha of thumbnail.
|
|
// Set alpha of thumbnail.
|
|
- itemImage.alpha = if (manga.favorite) 0.3f else 1.0f
|
|
|
|
|
|
+ cover.alpha = if (manga.favorite) 0.3f else 1.0f
|
|
|
|
|
|
setImage(manga)
|
|
setImage(manga)
|
|
}
|
|
}
|
|
|
|
|
|
fun setImage(manga: Manga) {
|
|
fun setImage(manga: Manga) {
|
|
- GlideApp.with(itemView.context).clear(itemImage)
|
|
|
|
|
|
+ GlideApp.with(itemView.context).clear(cover)
|
|
if (!manga.thumbnail_url.isNullOrEmpty()) {
|
|
if (!manga.thumbnail_url.isNullOrEmpty()) {
|
|
GlideApp.with(itemView.context)
|
|
GlideApp.with(itemView.context)
|
|
.load(manga.toMangaThumbnail())
|
|
.load(manga.toMangaThumbnail())
|
|
@@ -51,7 +51,7 @@ class GlobalSearchCardHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
|
.centerCrop()
|
|
.centerCrop()
|
|
.skipMemoryCache(true)
|
|
.skipMemoryCache(true)
|
|
.placeholder(android.R.color.transparent)
|
|
.placeholder(android.R.color.transparent)
|
|
- .into(StateImageViewTarget(itemImage, progress))
|
|
|
|
|
|
+ .into(StateImageViewTarget(cover, progress))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|