Merge branch 'main' into nico/fix-okb-bootstrap

This commit is contained in:
Nicolas Werner 2023-09-19 14:02:18 +02:00 committed by GitHub
commit dab7f6667e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -233,7 +233,7 @@ abstract class DatabaseApi {
Future removeEvent(String eventId, String roomId); Future removeEvent(String eventId, String roomId);
Future setRoomPrevBatch( Future setRoomPrevBatch(
String prevBatch, String? prevBatch,
String roomId, String roomId,
Client client, Client client,
); );

View File

@ -944,7 +944,7 @@ class HiveCollectionsDatabase extends DatabaseApi {
@override @override
Future<void> setRoomPrevBatch( Future<void> setRoomPrevBatch(
String prevBatch, String roomId, Client client) async { String? prevBatch, String roomId, Client client) async {
final raw = await _roomsBox.get(roomId); final raw = await _roomsBox.get(roomId);
if (raw == null) return; if (raw == null) return;
final room = Room.fromJson(copyMap(raw), client); final room = Room.fromJson(copyMap(raw), client);

View File

@ -885,7 +885,7 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
@override @override
Future<void> setRoomPrevBatch( Future<void> setRoomPrevBatch(
String prevBatch, String roomId, Client client) async { String? prevBatch, String roomId, Client client) async {
final raw = await _roomsBox.get(roomId.toHiveKey); final raw = await _roomsBox.get(roomId.toHiveKey);
if (raw == null) return; if (raw == null) return;
final room = Room.fromJson(convertToJson(raw), client); final room = Room.fromJson(convertToJson(raw), client);

View File

@ -1281,7 +1281,7 @@ class Room {
if (client.database != null) { if (client.database != null) {
await client.database?.transaction(() async { await client.database?.transaction(() async {
if (storeInDatabase) { if (storeInDatabase) {
await client.database?.setRoomPrevBatch(resp.end!, id, client); await client.database?.setRoomPrevBatch(resp.end, id, client);
} }
await loadFn(); await loadFn();
}); });