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.
This commit is contained in:
Travis Ralston 2019-12-06 14:50:56 -07:00
parent 185830e4f3
commit 4bcf99f65e

View file

@ -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) {