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()
}
/**
* Renews the downloads cache.
*/

View File

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

View File

@ -1,15 +1,14 @@
package eu.kanade.tachiyomi.ui.source.browse
import android.view.View
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import coil.Coil
import coil.clear
import coil.request.ImageRequest
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.IFlexible
import eu.kanade.tachiyomi.R
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.databinding.MangaListItemBinding
@ -34,8 +33,7 @@ class BrowseSourceListHolder(private val view: View, adapter: FlexibleAdapter<IF
*/
override fun onSetValues(manga: Manga) {
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)
}