mirror of https://github.com/vector-im/riot-web
Merge pull request #3804 from matrix-org/t3chguy/rightpanel
'Members' button always toggle the right panelpull/21833/head
commit
3ed7beac78
|
@ -66,8 +66,13 @@ export default class GroupHeaderButtons extends HeaderButtons {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMembersClicked() {
|
_onMembersClicked() {
|
||||||
// This toggles for us, if needed
|
if (this.state.phase === RIGHT_PANEL_PHASES.GroupMemberInfo) {
|
||||||
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberList);
|
// send the active phase to trigger a toggle
|
||||||
|
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberInfo);
|
||||||
|
} else {
|
||||||
|
// This toggles for us, if needed
|
||||||
|
this.setPhase(RIGHT_PANEL_PHASES.GroupMemberList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRoomsClicked() {
|
_onRoomsClicked() {
|
||||||
|
|
|
@ -23,6 +23,7 @@ import { _t } from '../../../languageHandler';
|
||||||
import HeaderButton from './HeaderButton';
|
import HeaderButton from './HeaderButton';
|
||||||
import HeaderButtons, {HEADER_KIND_ROOM} from './HeaderButtons';
|
import HeaderButtons, {HEADER_KIND_ROOM} from './HeaderButtons';
|
||||||
import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
|
import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
|
||||||
|
import RightPanelStore from "../../../stores/RightPanelStore";
|
||||||
|
|
||||||
const MEMBER_PHASES = [
|
const MEMBER_PHASES = [
|
||||||
RIGHT_PANEL_PHASES.RoomMemberList,
|
RIGHT_PANEL_PHASES.RoomMemberList,
|
||||||
|
@ -56,8 +57,13 @@ export default class RoomHeaderButtons extends HeaderButtons {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMembersClicked() {
|
_onMembersClicked() {
|
||||||
// This toggles for us, if needed
|
if (this.state.phase === RIGHT_PANEL_PHASES.RoomMemberInfo) {
|
||||||
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberList);
|
// send the active phase to trigger a toggle
|
||||||
|
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberInfo, RightPanelStore.getSharedInstance().roomPanelPhaseParams);
|
||||||
|
} else {
|
||||||
|
// This toggles for us, if needed
|
||||||
|
this.setPhase(RIGHT_PANEL_PHASES.RoomMemberList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onFilesClicked() {
|
_onFilesClicked() {
|
||||||
|
|
Loading…
Reference in New Issue