From ad9be61477b72bef1a3db5e8a26bec88b92aa3a6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 3 Sep 2020 15:01:32 +0100 Subject: [PATCH] Move HeaderButtons to an abstract class --- src/components/views/right_panel/GroupHeaderButtons.tsx | 2 -- src/components/views/right_panel/HeaderButtons.tsx | 4 +--- src/components/views/right_panel/RoomHeaderButtons.tsx | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/components/views/right_panel/GroupHeaderButtons.tsx b/src/components/views/right_panel/GroupHeaderButtons.tsx index 44237e401f..c468658eb6 100644 --- a/src/components/views/right_panel/GroupHeaderButtons.tsx +++ b/src/components/views/right_panel/GroupHeaderButtons.tsx @@ -46,8 +46,6 @@ export default class GroupHeaderButtons extends HeaderButtons { } protected onAction(payload: ActionPayload) { - super.onAction(payload); - if (payload.action === Action.ViewUser) { if ((payload as ViewUserPayload).member) { this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member}); diff --git a/src/components/views/right_panel/HeaderButtons.tsx b/src/components/views/right_panel/HeaderButtons.tsx index bbb783ccb9..e922959bbb 100644 --- a/src/components/views/right_panel/HeaderButtons.tsx +++ b/src/components/views/right_panel/HeaderButtons.tsx @@ -65,9 +65,7 @@ export default abstract class HeaderButtons extends React.Component) { dis.dispatch({ diff --git a/src/components/views/right_panel/RoomHeaderButtons.tsx b/src/components/views/right_panel/RoomHeaderButtons.tsx index 7ac547f499..671d9b0068 100644 --- a/src/components/views/right_panel/RoomHeaderButtons.tsx +++ b/src/components/views/right_panel/RoomHeaderButtons.tsx @@ -36,13 +36,9 @@ const MEMBER_PHASES = [ export default class RoomHeaderButtons extends HeaderButtons { constructor(props) { super(props, HeaderKind.Room); - this.onMembersClicked = this.onMembersClicked.bind(this); - this.onFilesClicked = this.onFilesClicked.bind(this); - this.onNotificationsClicked = this.onNotificationsClicked.bind(this); } protected onAction(payload: ActionPayload) { - super.onAction(payload); if (payload.action === Action.ViewUser) { if (payload.member) { this.setPhase(RightPanelPhases.RoomMemberInfo, {member: payload.member});