From b2e5ad08803a5af77e6e8faeb98a1429e38043f3 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Tue, 19 May 2020 10:15:23 +0200 Subject: [PATCH] fix notification count --- lib/src/client.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 708c4f9..ae3182a 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1216,14 +1216,14 @@ class Client { prev_batch: prev_batch, summary: summary, ); + if (database != null) { + await database.storeRoomUpdate(this.id, update, getRoomById(id)); + } _updateRoomsByRoomUpdate(update); final roomObj = getRoomById(id); if (limitedTimeline && roomObj != null) { roomObj.resetSortOrder(); } - if (database != null) { - await database.storeRoomUpdate(this.id, update, getRoomById(id)); - } onRoomUpdate.add(update); var handledEvents = false;