Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/views/elements/AppTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingSto
import { SdkContextClass } from "../../../contexts/SDKContext";
import { ModuleRunner } from "../../../modules/ModuleRunner";
import { parseUrl } from "../../../utils/UrlUtils";
import RightPanelStore from "../../../stores/right-panel/RightPanelStore.ts";
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases.ts";

interface IProps {
app: IWidget | IApp;
Expand Down Expand Up @@ -576,6 +578,14 @@ export default class AppTile extends React.Component<IProps, IState> {
? Container.Top
: Container.Center;
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 => {
Expand Down
Loading