Merge branch 'main' into nico/fix-okb-bootstrap
This commit is contained in:
commit
dab7f6667e
|
|
@ -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,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue