set account ui state on createElement. fixes #1325
This commit is contained in:
parent
72497b77b2
commit
73735010ae
1 changed files with 4 additions and 3 deletions
|
@ -9,7 +9,7 @@ class Account extends Component {
|
||||||
this.enabled = state.capabilities.account;
|
this.enabled = state.capabilities.account;
|
||||||
this.local = state.components[name] = {};
|
this.local = state.components[name] = {};
|
||||||
this.buttonClass = '';
|
this.buttonClass = '';
|
||||||
this.setState();
|
this.setLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
avatarClick(event) {
|
avatarClick(event) {
|
||||||
|
@ -39,7 +39,7 @@ class Account extends Component {
|
||||||
return this.local.loggedIn !== this.state.user.loggedIn;
|
return this.local.loggedIn !== this.state.user.loggedIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
setState() {
|
setLocal() {
|
||||||
const changed = this.changed();
|
const changed = this.changed();
|
||||||
if (changed) {
|
if (changed) {
|
||||||
this.local.loggedIn = this.state.user.loggedIn;
|
this.local.loggedIn = this.state.user.loggedIn;
|
||||||
|
@ -48,7 +48,7 @@ class Account extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
return this.setState();
|
return this.setLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
createElement() {
|
createElement() {
|
||||||
|
@ -59,6 +59,7 @@ class Account extends Component {
|
||||||
}
|
}
|
||||||
const user = this.state.user;
|
const user = this.state.user;
|
||||||
const translate = this.state.translate;
|
const translate = this.state.translate;
|
||||||
|
this.setLocal();
|
||||||
if (!this.local.loggedIn) {
|
if (!this.local.loggedIn) {
|
||||||
return html`
|
return html`
|
||||||
<send-account>
|
<send-account>
|
||||||
|
|
Loading…
Reference in a new issue