feat: add club selection clearing button and improve navigation logic after login
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 43s

This commit is contained in:
Torsten Schulz (local)
2026-05-15 16:26:45 +02:00
parent 669f3f0365
commit 3d0c298af7
2 changed files with 23 additions and 1 deletions

View File

@@ -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"))
}
}
}

View File

@@ -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
}
}
}
}