Skip to content

High performance self-hosted photo and video management solution.

chore: follow up on auth refactoring (#14367)

Alexb4c96a09fb16
diff --git a/mobile/lib/repositories/auth.repository.dart b/mobile/lib/repositories/auth.repository.dart
index f003890696..ababf35c9b 100644
--- a/mobile/lib/repositories/auth.repository.dart
+++ b/mobile/lib/repositories/auth.repository.dart
@@ -17,12 +17,14 @@ class AuthRepository extends DatabaseRepository implements IAuthRepository {
@override
Future<void> clearLocalData() {
- return db.writeTxn(() async {
- await db.assets.clear();
- await db.exifInfos.clear();
- await db.albums.clear();
- await db.eTags.clear();
- await db.users.clear();
+ return db.writeTxn(() {
+ return Future.wait([
+ db.assets.clear(),
+ db.exifInfos.clear(),
+ db.albums.clear(),
+ db.eTags.clear(),
+ db.users.clear(),
+ ]);
});
}
}
diff --git a/mobile/lib/services/auth.service.dart b/mobile/lib/services/auth.service.dart
index e61f485987..fa6e282e63 100644
--- a/mobile/lib/services/auth.service.dart
+++ b/mobile/lib/services/auth.service.dart
@@ -63,7 +63,9 @@ class AuthService {
} catch (error, stackTrace) {
_log.severe("Error logging out", error, stackTrace);
} finally {
- await clearLocalData();
+ await clearLocalData().catchError((error, stackTrace) {
+ _log.severe("Error clearing local data", error, stackTrace);
+ });
}
}