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:
parent
185830e4f3
commit
4bcf99f65e
1 changed files with 6 additions and 0 deletions
|
@ -42,10 +42,16 @@ export default class HeaderButtons extends React.Component {
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this._storeToken = RightPanelStore.getSharedInstance().addListener(this.onRightPanelUpdate.bind(this));
|
this._storeToken = RightPanelStore.getSharedInstance().addListener(this.onRightPanelUpdate.bind(this));
|
||||||
|
this._dispatcherRef = dis.register(this.onAction.bind(this)); // used by subclasses
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
if (this._storeToken) this._storeToken.remove();
|
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) {
|
setPhase(phase, extras) {
|
||||||
|
|
Loading…
Reference in a new issue