Right panel: view third party invite info without clearing history (#11934)

* add View3pidInvite to actions enum, replace uses

* extract out action handler

* push card instead, test

* comment
This commit is contained in:
Kerry 2023-11-28 11:30:57 +13:00 committed by GitHub
parent fbd64d37f2
commit 0bbb9e8c89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 124 additions and 10 deletions

View file

@ -55,6 +55,7 @@ import PosthogTrackers from "../../../PosthogTrackers";
import { SDKContext } from "../../../contexts/SDKContext";
import { canInviteTo } from "../../../utils/room/canInviteTo";
import { inviteToRoom } from "../../../utils/room/inviteToRoom";
import { Action } from "../../../dispatcher/actions";
const INITIAL_LOAD_NUM_MEMBERS = 30;
const INITIAL_LOAD_NUM_INVITED = 5;
@ -275,7 +276,7 @@ export default class MemberList extends React.Component<IProps, IState> {
private onPending3pidInviteClick = (inviteEvent: MatrixEvent): void => {
dis.dispatch({
action: "view_3pid_invite",
action: Action.View3pidInvite,
event: inviteEvent,
});
};

View file

@ -27,6 +27,7 @@ import RoomAvatar from "../avatars/RoomAvatar";
import RoomName from "../elements/RoomName";
import ErrorDialog from "../dialogs/ErrorDialog";
import AccessibleButton from "../elements/AccessibleButton";
import { Action } from "../../../dispatcher/actions";
interface IProps {
event: MatrixEvent;
@ -91,7 +92,7 @@ export default class ThirdPartyMemberInfo extends React.Component<IProps, IState
public onCancel = (): void => {
dis.dispatch({
action: "view_3pid_invite",
action: Action.View3pidInvite,
event: null,
});
};