From 471d5d62d5cbd498aed41ad100e1a4169365c00c Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 16 May 2020 16:32:14 -0400 Subject: [PATCH] Move cover card outline clipping code from item to holder classes --- .../tachiyomi/ui/browse/source/browse/SourceGridHolder.kt | 4 ++++ .../eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt | 3 --- .../java/eu/kanade/tachiyomi/ui/library/LibraryGridHolder.kt | 4 ++++ .../main/java/eu/kanade/tachiyomi/ui/library/LibraryItem.kt | 3 --- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceGridHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceGridHolder.kt index c26174c34..360df59bd 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceGridHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceGridHolder.kt @@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.glide.GlideApp import eu.kanade.tachiyomi.data.glide.toMangaThumbnail import eu.kanade.tachiyomi.widget.StateImageViewTarget +import kotlinx.android.synthetic.main.source_grid_item.card import kotlinx.android.synthetic.main.source_grid_item.progress import kotlinx.android.synthetic.main.source_grid_item.thumbnail import kotlinx.android.synthetic.main.source_grid_item.title @@ -39,6 +40,9 @@ class SourceGridHolder(private val view: View, private val adapter: FlexibleAdap } override fun setImage(manga: Manga) { + // Setting this via XML doesn't work + card.clipToOutline = true + GlideApp.with(view.context).clear(thumbnail) if (!manga.thumbnail_url.isNullOrEmpty()) { GlideApp.with(view.context) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt index 414523716..e3f89c896 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceItem.kt @@ -34,9 +34,6 @@ class SourceItem(val manga: Manga, private val catalogueAsList: Preference