From 5c393cc2d0a3f40886132784f92264902d22715c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 18 Jan 2021 20:29:51 -0700 Subject: [PATCH] Add in some local echo support to make changes appear faster --- src/stores/widgets/WidgetLayoutStore.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stores/widgets/WidgetLayoutStore.ts b/src/stores/widgets/WidgetLayoutStore.ts index 94d77df78b..7d695578cd 100644 --- a/src/stores/widgets/WidgetLayoutStore.ts +++ b/src/stores/widgets/WidgetLayoutStore.ts @@ -444,7 +444,8 @@ export class WidgetLayoutStore extends ReadyWatchingStore { SettingsStore.setValue("Widgets.layout", room.roomId, SettingLevel.ROOM_ACCOUNT, { overrides: layoutEv?.getId(), widgets: newLayout, - }); + }).catch(() => this.recalculateRoom(room)); + this.recalculateRoom(room); // call to try local echo on changes (the catch above undoes any errors) } }