Refactoring BrowseSourceListHolder and download files

This commit is contained in:
Jays2Kings 2021-06-22 22:37:50 -04:00
parent 97c4f6979b
commit cee7c30a02
3 changed files with 3 additions and 6 deletions

View File

@ -123,7 +123,6 @@ class DownloadCache(
lastRenew = System.currentTimeMillis() lastRenew = System.currentTimeMillis()
} }
/** /**
* Renews the downloads cache. * Renews the downloads cache.
*/ */

View File

@ -379,4 +379,4 @@ class DownloadManager(val context: Context) {
fun addListener(listener: DownloadQueue.DownloadListener) = queue.addListener(listener) fun addListener(listener: DownloadQueue.DownloadListener) = queue.addListener(listener)
fun removeListener(listener: DownloadQueue.DownloadListener) = queue.removeListener(listener) fun removeListener(listener: DownloadQueue.DownloadListener) = queue.removeListener(listener)
} }

View File

@ -1,15 +1,14 @@
package eu.kanade.tachiyomi.ui.source.browse package eu.kanade.tachiyomi.ui.source.browse
import android.view.View import android.view.View
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import coil.Coil import coil.Coil
import coil.clear import coil.clear
import coil.request.ImageRequest import coil.request.ImageRequest
import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.IFlexible import eu.davidea.flexibleadapter.items.IFlexible
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget import eu.kanade.tachiyomi.data.image.coil.CoverViewTarget
import eu.kanade.tachiyomi.databinding.MangaListItemBinding import eu.kanade.tachiyomi.databinding.MangaListItemBinding
@ -34,8 +33,7 @@ class BrowseSourceListHolder(private val view: View, adapter: FlexibleAdapter<IF
*/ */
override fun onSetValues(manga: Manga) { override fun onSetValues(manga: Manga) {
binding.title.text = manga.title binding.title.text = manga.title
binding.inLibraryBadge.inLibraryBadge.visibility = if (manga.favorite) View.VISIBLE else View.GONE binding.inLibraryBadge.badge.isVisible = manga.favorite
setImage(manga) setImage(manga)
} }