Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix logout not popping

AmanRajSinghMourya337a23292109
diff --git a/mobile/packages/accounts/lib/services/user_service.dart b/mobile/packages/accounts/lib/services/user_service.dart
index 101cba3c4e..68552f0322 100644
--- a/mobile/packages/accounts/lib/services/user_service.dart
+++ b/mobile/packages/accounts/lib/services/user_service.dart
@@ -288,8 +288,7 @@ class UserService {
final response = await _enteDio.post("/users/logout");
if (response.statusCode == 200) {
await _config.logout();
- await Navigator.of(context)
- .pushNamedAndRemoveUntil('/', (route) => false);
+ Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
} else {
throw Exception("Log out action failed");
}
@@ -298,8 +297,7 @@ class UserService {
// check if token is already invalid
if (e is DioException && e.response?.statusCode == 401) {
await _config.logout();
- await Navigator.of(context)
- .pushNamedAndRemoveUntil('/', (route) => false);
+ Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
return;
}
//This future is for waiting for the dialog from which logout() is called