Skip to content

Commit e3e375e

Browse files
committed
fix: quickpay intro navigation
1 parent 5ee1324 commit e3e375e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/src/main/java/to/bitkit/ui/ContentView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,8 @@ fun NavController.navigateToWidgetsSettings() = navigate(
13521352
route = Routes.WidgetsSettings,
13531353
)
13541354

1355-
fun NavController.navigateToQuickPaySettings() = navigate(
1356-
route = Routes.QuickPaySettings,
1355+
fun NavController.navigateToQuickPaySettings(hasSeenIntro: Boolean = true) = navigate(
1356+
route = if (hasSeenIntro) Routes.QuickPaySettings else Routes.QuickPayIntro,
13571357
)
13581358

13591359
fun NavController.navigateToTagsSettings() = navigate(

app/src/main/java/to/bitkit/ui/settings/general/GeneralSettingsScreen.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ fun GeneralSettingsScreen(
4141
val currencies = LocalCurrencies.current
4242
val defaultTransactionSpeed by settings.defaultTransactionSpeed.collectAsStateWithLifecycle()
4343
val lastUsedTags by settings.lastUsedTags.collectAsStateWithLifecycle()
44+
val quickPayIntroSeen by settings.quickPayIntroSeen.collectAsStateWithLifecycle()
45+
4446

4547
GeneralSettingsContent(
4648
selectedCurrency = currencies.selectedCurrency,
@@ -53,7 +55,7 @@ fun GeneralSettingsScreen(
5355
onDefaultUnitClick = { navController.navigateToDefaultUnitSettings() },
5456
onTransactionSpeedClick = { navController.navigateToTransactionSpeedSettings() },
5557
onWidgetsClick = { navController.navigateToWidgetsSettings() },
56-
onQuickPayClick = { navController.navigateToQuickPaySettings() },
58+
onQuickPayClick = { navController.navigateToQuickPaySettings(quickPayIntroSeen) },
5759
onTagsClick = { navController.navigateToTagsSettings() },
5860
)
5961
}

0 commit comments

Comments
 (0)