Fix RoomViewStore forgetting some details of a view room call (#7512)
This commit is contained in:
committed by
GitHub
parent
3a18fd8f71
commit
ec6c1b8272
@@ -56,7 +56,7 @@ import AccessibleButton from "../views/elements/AccessibleButton";
|
||||
import RightPanelStore from "../../stores/right-panel/RightPanelStore";
|
||||
import { haveTileForEvent } from "../views/rooms/EventTile";
|
||||
import RoomContext, { TimelineRenderingType } from "../../contexts/RoomContext";
|
||||
import MatrixClientContext, { withMatrixClientHOC, MatrixClientProps } from "../../contexts/MatrixClientContext";
|
||||
import MatrixClientContext, { MatrixClientProps, withMatrixClientHOC } from "../../contexts/MatrixClientContext";
|
||||
import { E2EStatus, shieldStatusForRoom } from '../../utils/ShieldUtils';
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import { IMatrixClientCreds } from "../../MatrixClientPeg";
|
||||
@@ -1777,7 +1777,10 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
onHiddenHighlightsClick = () => {
|
||||
const oldRoom = this.getOldRoom();
|
||||
if (!oldRoom) return;
|
||||
dis.dispatch({ action: "view_room", room_id: oldRoom.roomId });
|
||||
dis.dispatch({
|
||||
action: Action.ViewRoom,
|
||||
room_id: oldRoom.roomId,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -327,7 +327,7 @@ export const showRoom = (cli: MatrixClient, hierarchy: RoomHierarchy, roomId: st
|
||||
|
||||
const roomAlias = getDisplayAliasForRoom(room) || undefined;
|
||||
dis.dispatch({
|
||||
action: "view_room",
|
||||
action: Action.ViewRoom,
|
||||
should_peek: true,
|
||||
_type: "room_directory", // instrumentation
|
||||
room_alias: roomAlias,
|
||||
|
||||
@@ -834,7 +834,7 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
|
||||
};
|
||||
|
||||
private onAction = (payload: ActionPayload) => {
|
||||
if (payload.action === "view_room" && payload.room_id === this.props.space.roomId) {
|
||||
if (payload.action === Action.ViewRoom && payload.room_id === this.props.space.roomId) {
|
||||
this.setState({ phase: Phase.Landing });
|
||||
return;
|
||||
}
|
||||
@@ -862,7 +862,7 @@ export default class SpaceRoomView extends React.PureComponent<IProps, IState> {
|
||||
private goToFirstRoom = async () => {
|
||||
if (this.state.firstRoomId) {
|
||||
defaultDispatcher.dispatch({
|
||||
action: "view_room",
|
||||
action: Action.ViewRoom,
|
||||
room_id: this.state.firstRoomId,
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user