feat: add club selection clearing button and improve navigation logic after login
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 43s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 43s
This commit is contained in:
@@ -5937,6 +5937,21 @@ private fun SettingsScreen(
|
||||
) {
|
||||
Text(tr("auth.logout", "Abmelden"))
|
||||
}
|
||||
|
||||
OutlinedButton(
|
||||
onClick = {
|
||||
dependencies.applicationScope.launch {
|
||||
// Clear only the club selection so the ClubSelectScreen appears
|
||||
dependencies.clubManager.clearSelection()
|
||||
}
|
||||
},
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = 8.dp)
|
||||
.heightIn(min = TouchMinHeight),
|
||||
) {
|
||||
Text(tr("club.change", "Verein wechseln"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,14 @@ class LoginScreen : Screen {
|
||||
|
||||
LaunchedEffect(state) {
|
||||
if (state is LoginState.Success) {
|
||||
navigator?.push(HomeScreen(1)) // Using clubId 1 for now
|
||||
// Login succeeded. Do not hardcode navigation to a specific club here;
|
||||
// the platform-specific host (e.g. AppRoot) decides the next screen.
|
||||
// Try to pop this screen if there is a previous entry.
|
||||
try {
|
||||
navigator?.pop()
|
||||
} catch (_: Exception) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user