mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 14:31:50 +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()
|
lastRenew = System.currentTimeMillis()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renews the downloads cache.
|
* Renews the downloads cache.
|
||||||
*/
|
*/
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user