mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:59:16 +01:00
Refactoring BrowseSourceListHolder and download files
This commit is contained in:
parent
97c4f6979b
commit
cee7c30a02
@ -123,7 +123,6 @@ class DownloadCache(
|
||||
lastRenew = System.currentTimeMillis()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Renews the downloads cache.
|
||||
*/
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user