Proper check for when to navigate to tracker settings from tracking action
This commit is contained in:
parent
e56bf82c31
commit
d20a8fcf13
2 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue