Proper check for when to navigate to tracker settings from tracking action

This commit is contained in:
arkon 2023-12-14 19:52:49 -05:00
parent e56bf82c31
commit d20a8fcf13
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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