mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix the type for SetRightPanelPhasePayload
Fix uses of it as well
This commit is contained in:
parent
5ea7be5d53
commit
bf450ad075
3 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ export default class GroupHeaderButtons extends HeaderButtons {
|
|||
|
||||
if (payload.action === Action.ViewUser) {
|
||||
if ((payload as ViewUserPayload).member) {
|
||||
this.setPhase(RightPanelPhases.RoomMemberInfo, {members: payload.member});
|
||||
this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member});
|
||||
} else {
|
||||
this.setPhase(RightPanelPhases.GroupMemberList);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export default class GroupHeaderButtons extends HeaderButtons {
|
|||
} else if (payload.action === "view_group_member_list") {
|
||||
this.setPhase(RightPanelPhases.GroupMemberList);
|
||||
} else if (payload.action === "view_group_user") {
|
||||
this.setPhase(RightPanelPhases.GroupMemberInfo, {members: payload.member});
|
||||
this.setPhase(RightPanelPhases.GroupMemberInfo, {member: payload.member});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ export default class RoomHeaderButtons extends HeaderButtons {
|
|||
super.onAction(payload);
|
||||
if (payload.action === Action.ViewUser) {
|
||||
if (payload.member) {
|
||||
this.setPhase(RightPanelPhases.RoomMemberInfo, {members: payload.member});
|
||||
this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member});
|
||||
} else {
|
||||
this.setPhase(RightPanelPhases.RoomMemberList);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ export interface SetRightPanelPhasePayload extends ActionPayload {
|
|||
export interface SetRightPanelPhaseRefireParams {
|
||||
// XXX: Fix after the types are defiend in matrix-js-sdk
|
||||
// No appropriate types exist yet for the fields
|
||||
members?: RoomMember;
|
||||
member?: RoomMember;
|
||||
verificationRequest?: typeof VerificationRequest;
|
||||
groupId?: string;
|
||||
groupRoomId?: string;
|
||||
|
|
Loading…
Reference in a new issue