diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt index cd140d298a..bd9f9c31ad 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/info/MangaInfoHeaderAdapter.kt @@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.glide.GlideApp import eu.kanade.tachiyomi.data.glide.MangaThumbnail import eu.kanade.tachiyomi.data.glide.toMangaThumbnail +import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.databinding.MangaInfoHeaderBinding import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceManager @@ -37,6 +38,7 @@ import reactivecircus.flowbinding.android.view.clicks import reactivecircus.flowbinding.android.view.longClicks import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get +import uy.kohesive.injekt.injectLazy class MangaInfoHeaderAdapter( private val controller: MangaController, @@ -44,6 +46,8 @@ class MangaInfoHeaderAdapter( ) : RecyclerView.Adapter() { + private val trackManager: TrackManager by injectLazy() + private var manga: Manga = controller.presenter.manga private var source: Source = controller.presenter.source private var trackCount: Int = 0 @@ -100,7 +104,7 @@ class MangaInfoHeaderAdapter( } with(binding.btnTracking) { - if (controller.presenter.manga.favorite) { + if (trackManager.hasLoggedServices()) { visible() if (trackCount > 0) {