diff --git a/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/AppRoot.kt b/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/AppRoot.kt index d0599972..7f41e9c9 100644 --- a/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/AppRoot.kt +++ b/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/AppRoot.kt @@ -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")) + } } } diff --git a/mobile-app/composeApp/src/commonMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/LoginScreen.kt b/mobile-app/composeApp/src/commonMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/LoginScreen.kt index d31004ca..43804b32 100644 --- a/mobile-app/composeApp/src/commonMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/LoginScreen.kt +++ b/mobile-app/composeApp/src/commonMain/kotlin/de/tsschulz/tt_tagebuch/app/ui/LoginScreen.kt @@ -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 + } } } }