mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 04:37:25 +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 },
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user