Skip to content

Commit 8177510

Browse files
authored
Merge pull request #376 from synonymdev/fix/quickpay-intro-nav
fix: quickpay intro navigation
2 parents ac9e5b3 + 5e5602f commit 8177510

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-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
@@ -1356,8 +1356,8 @@ fun NavController.navigateToWidgetsSettings() = navigate(
13561356
route = Routes.WidgetsSettings,
13571357
)
13581358

1359-
fun NavController.navigateToQuickPaySettings() = navigate(
1360-
route = Routes.QuickPaySettings,
1359+
fun NavController.navigateToQuickPaySettings(hasSeenIntro: Boolean = true) = navigate(
1360+
route = if (hasSeenIntro) Routes.QuickPaySettings else Routes.QuickPayIntro,
13611361
)
13621362

13631363
fun NavController.navigateToTagsSettings() = navigate(

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ 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()
4445

4546
GeneralSettingsContent(
4647
selectedCurrency = currencies.selectedCurrency,
@@ -53,7 +54,7 @@ fun GeneralSettingsScreen(
5354
onDefaultUnitClick = { navController.navigateToDefaultUnitSettings() },
5455
onTransactionSpeedClick = { navController.navigateToTransactionSpeedSettings() },
5556
onWidgetsClick = { navController.navigateToWidgetsSettings() },
56-
onQuickPayClick = { navController.navigateToQuickPaySettings() },
57+
onQuickPayClick = { navController.navigateToQuickPaySettings(quickPayIntroSeen) },
5758
onTagsClick = { navController.navigateToTagsSettings() },
5859
)
5960
}

0 commit comments

Comments
 (0)