Pop right panel timeline when unmaximising widget to avoid double timeline (#94)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
81192f6989
commit
ef9e310a25
1 changed files with 10 additions and 0 deletions
|
@ -50,6 +50,8 @@ import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingSto
|
||||||
import { SdkContextClass } from "../../../contexts/SDKContext";
|
import { SdkContextClass } from "../../../contexts/SDKContext";
|
||||||
import { ModuleRunner } from "../../../modules/ModuleRunner";
|
import { ModuleRunner } from "../../../modules/ModuleRunner";
|
||||||
import { parseUrl } from "../../../utils/UrlUtils";
|
import { parseUrl } from "../../../utils/UrlUtils";
|
||||||
|
import RightPanelStore from "../../../stores/right-panel/RightPanelStore.ts";
|
||||||
|
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases.ts";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
app: IWidget | IApp;
|
app: IWidget | IApp;
|
||||||
|
@ -576,6 +578,14 @@ export default class AppTile extends React.Component<IProps, IState> {
|
||||||
? Container.Top
|
? Container.Top
|
||||||
: Container.Center;
|
: Container.Center;
|
||||||
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, targetContainer);
|
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, targetContainer);
|
||||||
|
|
||||||
|
// If the right panel has a timeline, but we're about to show the timeline in the main view, pop the right panel
|
||||||
|
if (
|
||||||
|
targetContainer === Container.Top &&
|
||||||
|
RightPanelStore.instance.currentCardForRoom(this.props.room.roomId).phase === RightPanelPhases.Timeline
|
||||||
|
) {
|
||||||
|
RightPanelStore.instance.popCard(this.props.room.roomId);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private onMinimiseClicked = (): void => {
|
private onMinimiseClicked = (): void => {
|
||||||
|
|
Loading…
Reference in a new issue