Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 208c620

Browse files
committed
Fix right panel store cleaning some state when permalink within room is clicked
1 parent 56514d5 commit 208c620

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stores/RightPanelStore.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {RightPanelPhases, RIGHT_PANEL_PHASES_NO_ARGS} from "./RightPanelStorePha
2222
import {ActionPayload} from "../dispatcher/payloads";
2323
import {Action} from '../dispatcher/actions';
2424
import { SettingLevel } from "../settings/SettingLevel";
25+
import RoomViewStore from './RoomViewStore';
2526

2627
interface RightPanelStoreState {
2728
// Whether or not to show the right panel at all. We split out rooms and groups
@@ -147,6 +148,8 @@ export default class RightPanelStore extends Store<ActionPayload> {
147148
switch (payload.action) {
148149
case 'view_room':
149150
case 'view_group':
151+
if (payload.room_id === RoomViewStore.getRoomId()) break; // skip this transition, probably a permalink
152+
150153
// Reset to the member list if we're viewing member info
151154
if (MEMBER_INFO_PHASES.includes(this.state.lastRoomPhase)) {
152155
this.setState({lastRoomPhase: RightPanelPhases.RoomMemberList, lastRoomPhaseParams: {}});

0 commit comments

Comments
 (0)