chore: Update SDK

This commit is contained in:
Krille Fear 2021-10-25 10:46:58 +02:00
commit 991018d86a
8 changed files with 15 additions and 17 deletions

View file

@ -461,8 +461,7 @@ class BackgroundPush {
Future<bool> eventExists(String roomId, String eventId) async {
final room = client.getRoomById(roomId);
if (room == null) return false;
return (await client.database.getEventById(client.id, eventId, room)) !=
null;
return (await client.database.getEventById(eventId, room)) != null;
}
/// Workaround for the problem that local notification IDs must be int but we
@ -579,7 +578,7 @@ class BackgroundPush {
throw 'Room not found';
}
await room.postLoad();
final event = await client.database.getEventById(client.id, eventId, room);
final event = await client.database.getEventById(eventId, room);
final activeRoomId = router.currentState.pathParameters['roomid'];

View file

@ -16,7 +16,7 @@ extension LocalizedBody on Event {
}
IconData get statusIcon {
switch (status) {
switch (status.intValue) {
case -1:
return Icons.error_outline;
case 0:

View file

@ -36,8 +36,8 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
}
@override
Future<void> clear(int clientId) async {
await super.clear(clientId);
Future<void> clear() async {
await super.clear();
await _customBox.deleteAll(_customBox.keys);
await _customBox.close();
}
@ -84,7 +84,7 @@ class FlutterMatrixHiveStore extends FamedlySdkHiveDatabase {
await db.open();
} catch (e, s) {
Logs().e('Unable to open Hive. Delete and try again...', e, s);
await db.clear(client.id);
await db.clear();
await db.open();
}
return db;