From eb4237f6f4d4e2c0daf686bf0980c554f87c436d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 23 Sep 2020 19:10:25 +0200 Subject: [PATCH] tell caller if an update was done from summery.writeAndApplyData so room actually emits an update --- src/matrix/room/RoomSummary.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/matrix/room/RoomSummary.js b/src/matrix/room/RoomSummary.js index a6fda3a0..b4826fa3 100644 --- a/src/matrix/room/RoomSummary.js +++ b/src/matrix/room/RoomSummary.js @@ -262,7 +262,7 @@ export class RoomSummary { async writeAndApplyData(data, storage) { if (data === this._data) { - return; + return false; } const txn = await storage.readWriteTxn([ storage.storeNames.roomSummary, @@ -275,6 +275,7 @@ export class RoomSummary { } await txn.complete(); this.applyChanges(data); + return true; } applyChanges(data) {