refactor: account menu controller [skip e2e]
This commit is contained in:
@@ -36,7 +36,6 @@ type State = {
|
||||
showBetaWarning: boolean
|
||||
showSyncResolution: boolean
|
||||
newUpdateAvailable: boolean
|
||||
showAccountMenu: boolean
|
||||
offline: boolean
|
||||
hasError: boolean
|
||||
arbitraryStatusMessage?: string
|
||||
@@ -62,7 +61,6 @@ class Footer extends AbstractComponent<Props, State> {
|
||||
showBetaWarning: false,
|
||||
showSyncResolution: false,
|
||||
newUpdateAvailable: false,
|
||||
showAccountMenu: false,
|
||||
}
|
||||
|
||||
this.webEventListenerDestroyer = props.application.addWebEventObserver((event, data) => {
|
||||
@@ -119,12 +117,6 @@ class Footer extends AbstractComponent<Props, State> {
|
||||
arbitraryStatusMessage: message,
|
||||
})
|
||||
})
|
||||
|
||||
this.autorun(() => {
|
||||
this.setState({
|
||||
showAccountMenu: this.application.accountMenuController.show,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
reloadUpgradeStatus() {
|
||||
@@ -347,7 +339,7 @@ class Footer extends AbstractComponent<Props, State> {
|
||||
<div className="sk-app-bar-item relative z-footer-bar-item ml-0 select-none">
|
||||
<AccountMenuButton
|
||||
hasError={this.state.hasError}
|
||||
isOpen={this.state.showAccountMenu}
|
||||
controller={this.application.accountMenuController}
|
||||
mainApplicationGroup={this.props.applicationGroup}
|
||||
onClickOutside={this.clickOutsideAccountMenu}
|
||||
toggleMenu={this.accountMenuClickHandler}
|
||||
|
||||
Reference in New Issue
Block a user