From d20a8fcf134a02735102010c5d10d1a4455ab8d6 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 14 Dec 2023 19:52:49 -0500 Subject: [PATCH] Proper check for when to navigate to tracker settings from tracking action --- app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt | 2 +- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt index 7b9b18ed6..53bae43d6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt @@ -132,7 +132,7 @@ class MangaScreen( ) }.takeIf { isHttpSource }, onTrackingClicked = { - if (successState.trackingCount == 0) { + if (screenModel.loggedInTrackers.isEmpty()) { navigator.push(SettingsScreen(SettingsScreen.Destination.Tracking)) } else { screenModel.showTrackDialog() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index cc38de779..30f4421b9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -118,7 +118,7 @@ class MangaScreenModel( private val successState: State.Success? get() = state.value as? State.Success - private val loggedInTrackers by lazy { trackerManager.trackers.filter { it.isLoggedIn } } + val loggedInTrackers by lazy { trackerManager.trackers.filter { it.isLoggedIn } } val manga: Manga? get() = successState?.manga