From 4bcf99f65e2ebb62104dde8d46fc7e6d28b8285f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 6 Dec 2019 14:50:56 -0700 Subject: [PATCH] Fix member info not opening The subclasses listen for view_user and similar dispatches, which then start up the RightPanel. We weren't registering a listener though because we changed to using the RightPanelStore for most of our logic. --- src/components/views/right_panel/HeaderButtons.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/views/right_panel/HeaderButtons.js b/src/components/views/right_panel/HeaderButtons.js index c43e8fc47e..ebe1f5f915 100644 --- a/src/components/views/right_panel/HeaderButtons.js +++ b/src/components/views/right_panel/HeaderButtons.js @@ -42,10 +42,16 @@ export default class HeaderButtons extends React.Component { componentWillMount() { this._storeToken = RightPanelStore.getSharedInstance().addListener(this.onRightPanelUpdate.bind(this)); + this._dispatcherRef = dis.register(this.onAction.bind(this)); // used by subclasses } componentWillUnmount() { if (this._storeToken) this._storeToken.remove(); + if (this._dispatcherRef) dis.unregister(this._dispatcherRef); + } + + onAction(payload) { + // Ignore - intended to be overridden by subclasses } setPhase(phase, extras) {