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

Commit

Permalink
automatically switch to TimelineCard on maximise
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Nov 10, 2021
1 parent 6b9fd1c commit db5bd87
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/stores/widgets/WidgetLayoutStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import { SettingLevel } from "../../settings/SettingLevel";
import { arrayFastClone } from "../../utils/arrays";
import { UPDATE_EVENT } from "../AsyncStore";
import { compare } from "../../utils/strings";
import dis from '../../dispatcher/dispatcher';
import { SetRightPanelPhasePayload } from "../../dispatcher/payloads/SetRightPanelPhasePayload";
import { Action } from "../../dispatcher/actions";
import { RightPanelPhases } from "../RightPanelStorePhases";

export const WIDGET_LAYOUT_EVENT_TYPE = "io.element.widgets.layout";

Expand Down Expand Up @@ -452,6 +456,11 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
for (const w of this.getContainerWidgets(room, Container.Center)) {
this.moveToContainer(room, w, Container.Right);
}
// Additionally change the right panel phase to chat:
dis.dispatch<SetRightPanelPhasePayload>({
action: Action.SetRightPanelPhase,
phase: RightPanelPhases.TimelinePanel,
});
break;
case Container.Top:
// new "top" widget => the center widget moves into "right"
Expand Down

0 comments on commit db5bd87

Please sign in to comment.