mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Move store subscribe to didmount
This commit is contained in:
parent
c684898ba0
commit
b3fac7c2cb
@ -38,10 +38,13 @@ export default class SetupEncryptionDialog extends React.Component {
|
||||
super();
|
||||
|
||||
this.store = SetupEncryptionStore.sharedInstance();
|
||||
this.store.on("update", this._onStoreUpdate);
|
||||
this.state = {icon: iconFromPhase(this.store.phase)};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.store.on("update", this._onStoreUpdate);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.store.removeListener("update", this._onStoreUpdate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user