mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-12 21:42:49 +01:00
Proper check for when to navigate to tracker settings from tracking action
This commit is contained in:
parent
e56bf82c31
commit
d20a8fcf13
@ -132,7 +132,7 @@ class MangaScreen(
|
|||||||
)
|
)
|
||||||
}.takeIf { isHttpSource },
|
}.takeIf { isHttpSource },
|
||||||
onTrackingClicked = {
|
onTrackingClicked = {
|
||||||
if (successState.trackingCount == 0) {
|
if (screenModel.loggedInTrackers.isEmpty()) {
|
||||||
navigator.push(SettingsScreen(SettingsScreen.Destination.Tracking))
|
navigator.push(SettingsScreen(SettingsScreen.Destination.Tracking))
|
||||||
} else {
|
} else {
|
||||||
screenModel.showTrackDialog()
|
screenModel.showTrackDialog()
|
||||||
|
@ -118,7 +118,7 @@ class MangaScreenModel(
|
|||||||
private val successState: State.Success?
|
private val successState: State.Success?
|
||||||
get() = state.value as? 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?
|
val manga: Manga?
|
||||||
get() = successState?.manga
|
get() = successState?.manga
|
||||||
|
Loading…
Reference in New Issue
Block a user