fix: location disclosure screen navigation bug
This commit is contained in:
parent
02a8db0f9a
commit
4196a543b2
|
@ -112,6 +112,11 @@ fun SettingsScreen(viewModel: SettingsViewModel = hiltViewModel(), appViewModel:
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
|
val onAutoTunnelClick = {
|
||||||
|
if (!uiState.generalState.isLocationDisclosureShown) {
|
||||||
|
navController.navigate(Route.LocationDisclosure)
|
||||||
|
} else navController.navigate(Route.AutoTunnel)
|
||||||
|
}
|
||||||
SurfaceSelectionGroupButton(
|
SurfaceSelectionGroupButton(
|
||||||
listOf(
|
listOf(
|
||||||
SelectionItem(
|
SelectionItem(
|
||||||
|
@ -124,11 +129,10 @@ fun SettingsScreen(viewModel: SettingsViewModel = hiltViewModel(), appViewModel:
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
if (!uiState.generalState.isLocationDisclosureShown) return@SelectionItem navController.navigate(Route.LocationDisclosure)
|
onAutoTunnelClick()
|
||||||
navController.navigate(Route.AutoTunnel)
|
|
||||||
},
|
},
|
||||||
trailing = {
|
trailing = {
|
||||||
ForwardButton(Modifier.focusable()) { navController.navigate(Route.AutoTunnel) }
|
ForwardButton(Modifier.focusable()) { onAutoTunnelClick() }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue