Fix RoomViewStore forgetting some details of a view room call (#7512)

This commit is contained in:
Michael Telatynski 2022-01-12 20:12:28 +00:00 committed by GitHub
parent 3a18fd8f71
commit ec6c1b8272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 67 additions and 57 deletions

View file

@ -33,6 +33,7 @@ import { arrayHasDiff } from "../../../utils/arrays";
import { useLocalEcho } from "../../../hooks/useLocalEcho";
import dis from "../../../dispatcher/dispatcher";
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";
import { Action } from "../../../dispatcher/actions";
interface IProps {
room: Room;
@ -267,7 +268,7 @@ const JoinRuleSettings = ({ room, promptUpgrade, aliasWarning, onError, beforeCh
// switch to the new room in the background
dis.dispatch({
action: "view_room",
action: Action.ViewRoom,
room_id: roomId,
});

View file

@ -36,6 +36,7 @@ import { useDispatcher } from "../../../../../hooks/useDispatcher";
import { CreateEventField, IGroupSummary } from "../../../dialogs/CreateSpaceFromCommunityDialog";
import { createSpaceFromCommunity } from "../../../../../utils/space";
import Spinner from "../../../elements/Spinner";
import { Action } from "../../../../../dispatcher/actions";
interface IProps {
closeSettingsFn(success: boolean): void;
@ -112,7 +113,7 @@ const CommunityMigrator = ({ onFinished }) => {
onClick={() => {
if (community.spaceId) {
dis.dispatch({
action: "view_room",
action: Action.ViewRoom,
room_id: community.spaceId,
});
onFinished();