Fix RoomViewStore forgetting some details of a view room call (#7512)
This commit is contained in:
parent
3a18fd8f71
commit
ec6c1b8272
21 changed files with 67 additions and 57 deletions
|
@ -43,6 +43,7 @@ import { ROOM_NOTIFICATIONS_TAB } from "../dialogs/RoomSettingsDialog";
|
|||
import { useEventEmitterState } from "../../../hooks/useEventEmitter";
|
||||
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";
|
||||
import DMRoomMap from "../../../utils/DMRoomMap";
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
|
||||
interface IProps extends IContextMenuProps {
|
||||
room: Room;
|
||||
|
@ -239,7 +240,7 @@ const RoomContextMenu = ({ room, onFinished, ...props }: IProps) => {
|
|||
const ensureViewingRoom = () => {
|
||||
if (RoomViewStore.getRoomId() === room.roomId) return;
|
||||
dis.dispatch({
|
||||
action: "view_room",
|
||||
action: Action.ViewRoom,
|
||||
room_id: room.roomId,
|
||||
}, true);
|
||||
};
|
||||
|
|
|
@ -18,9 +18,7 @@ import React, { useContext } from "react";
|
|||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
import {
|
||||
IProps as IContextMenuProps,
|
||||
} from "../../structures/ContextMenu";
|
||||
import { IProps as IContextMenuProps } from "../../structures/ContextMenu";
|
||||
import IconizedContextMenu, { IconizedContextMenuOption, IconizedContextMenuOptionList } from "./IconizedContextMenu";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import {
|
||||
|
@ -180,7 +178,7 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =
|
|||
ev.stopPropagation();
|
||||
|
||||
defaultDispatcher.dispatch({
|
||||
action: "view_room",
|
||||
action: Action.ViewRoom,
|
||||
room_id: space.roomId,
|
||||
});
|
||||
onFinished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue