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

'Members' button always toggle the right panel #3804

Merged
merged 7 commits into from
Jan 16, 2020
3 changes: 2 additions & 1 deletion src/components/views/right_panel/GroupHeaderButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { _t } from '../../../languageHandler';
import HeaderButton from './HeaderButton';
import HeaderButtons, {HEADER_KIND_GROUP} from './HeaderButtons';
import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
import RightPanelStore from "../../../stores/RightPanelStore";
t3chguy marked this conversation as resolved.
Show resolved Hide resolved

const GROUP_PHASES = [
RIGHT_PANEL_PHASES.GroupMemberInfo,
Expand Down Expand Up @@ -68,7 +69,7 @@ export default class GroupHeaderButtons extends HeaderButtons {
_onMembersClicked() {
if (this.state.phase === RIGHT_PANEL_PHASES.GroupMemberInfo) {
// send the active phase to trigger a toggle
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberInfo);
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberInfo, RightPanelStore.getSharedInstance().roomPanelPhaseParams);
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
} else {
// This toggles for us, if needed
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberList);
Expand Down
3 changes: 2 additions & 1 deletion src/components/views/right_panel/RoomHeaderButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { _t } from '../../../languageHandler';
import HeaderButton from './HeaderButton';
import HeaderButtons, {HEADER_KIND_ROOM} from './HeaderButtons';
import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
import RightPanelStore from "../../../stores/RightPanelStore";

const MEMBER_PHASES = [
RIGHT_PANEL_PHASES.RoomMemberList,
Expand Down Expand Up @@ -58,7 +59,7 @@ export default class RoomHeaderButtons extends HeaderButtons {
_onMembersClicked() {
if (this.state.phase === RIGHT_PANEL_PHASES.RoomMemberInfo) {
// send the active phase to trigger a toggle
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberInfo);
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberInfo, RightPanelStore.getSharedInstance().roomPanelPhaseParams);
} else {
// This toggles for us, if needed
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberList);
Expand Down