diff --git a/lib/screens/settings_screen_sections/auth_section.dart b/lib/screens/settings_screen_sections/auth_section.dart index f5fa50a..8eb1c2a 100644 --- a/lib/screens/settings_screen_sections/auth_section.dart +++ b/lib/screens/settings_screen_sections/auth_section.dart @@ -30,18 +30,20 @@ class AuthSection extends StatelessWidget { onTap: () async { if (appState.isLoggedIn) { await appState.logout(); + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(locService.t('auth.loggedOut')), + backgroundColor: Colors.grey, + ), + ); + } } else { + // Start login flow - the user will be redirected to browser await appState.forceLogin(); - } - if (context.mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar( - content: Text(appState.isLoggedIn - ? locService.t('auth.loggedInAs', params: [appState.username]) - : locService.t('auth.loggedOut')), - backgroundColor: appState.isLoggedIn ? Colors.green : Colors.grey, - ), - ); + + // Don't show immediate feedback - the UI will update automatically + // when the OAuth callback completes and notifyListeners() is called } }, ),