refine blocked user message, send users to blocks page instead of messages when username is available

This commit is contained in:
stopflock committed 2026-10-04 19:34:31 -05:00
1 parent 54ef1b8afc
commit 1d6cfd775f
17 files changed
+202 -43

No files matched your search

+12 -2
View File
@@ -28,11 +28,16 @@ class AuthState extends ChangeNotifier {
Future<void> login() async {
try {
_username = await _auth.login();
notifyListeners();
} catch (e) {
debugPrint("AuthState: Login error: $e");
_username = null;
notifyListeners();
// Don't swallow this - the caller (AppState) needs to know login
// failed so it can tell the user, rather than silently staying
// logged out with no explanation.
rethrow;
}
notifyListeners();
}
Future<void> logout() async {
@@ -58,11 +63,16 @@ class AuthState extends ChangeNotifier {
Future<void> forceLogin() async {
try {
_username = await _auth.forceLogin();
notifyListeners();
} catch (e) {
debugPrint("AuthState: Forced login error: $e");
_username = null;
notifyListeners();
// Don't swallow this - the caller (AppState) needs to know login
// failed so it can tell the user, rather than silently staying
// logged out with no explanation.
rethrow;
}
notifyListeners();
}
Future<bool> validateToken() async {