From 2f1d2ed5f89f36705770adc13fb27ce6e5a69f11 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 17 Feb 2022 09:20:48 +0000 Subject: [PATCH] Fix space panel notification badge behaviour and metrics (#7823) --- src/stores/spaces/SpaceStore.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts index e1e4b5ea23..ebcf987d4b 100644 --- a/src/stores/spaces/SpaceStore.ts +++ b/src/stores/spaces/SpaceStore.ts @@ -154,15 +154,14 @@ export class SpaceStoreClass extends AsyncStoreWithClient { public setActiveRoomInSpace(space: SpaceKey): void { if (!isMetaSpace(space) && !this.matrixClient?.getRoom(space)?.isSpaceRoom()) return; - if (space !== this.activeSpace) this.setActiveSpace(space); + if (space !== this.activeSpace) this.setActiveSpace(space, false); if (space) { const roomId = this.getNotificationState(space).getFirstRoomWithNotifications(); defaultDispatcher.dispatch({ action: Action.ViewRoom, room_id: roomId, - context_switch: true, - _trigger: "WebSpaceContextSwitch", + _trigger: "WebSpacePanelNotificationBadge", }); } else { const lists = RoomListStore.instance.unfilteredLists; @@ -179,8 +178,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { defaultDispatcher.dispatch({ action: Action.ViewRoom, room_id: unreadRoom.roomId, - context_switch: true, - _trigger: "WebSpaceContextSwitch", + _trigger: "WebSpacePanelNotificationBadge", }); break; }