mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-10-08 00:51:13 +02:00
refine blocked user message, send users to blocks page instead of messages when username is available
This commit is contained in:
1 parent
54ef1b8afc
commit
1d6cfd775f
17 files changed
+202
-43
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user