fix: deactivate themes when switching accounts
This commit is contained in:
@@ -527,7 +527,6 @@ export class Footer extends PureComponent<Props, State> {
|
||||
className="sk-app-bar-item"
|
||||
>
|
||||
<div
|
||||
id="account-switcher-icon"
|
||||
className={
|
||||
(this.state.hasPasscode ? 'alone' : '') +
|
||||
' flex items-center'
|
||||
|
||||
@@ -170,7 +170,7 @@ export class ThemeManager extends ApplicationService {
|
||||
);
|
||||
}
|
||||
|
||||
private deactivateAllThemes() {
|
||||
public deactivateAllThemes() {
|
||||
const activeThemes = this.activeThemes.slice();
|
||||
for (const uuid of activeThemes) {
|
||||
this.deactivateTheme(uuid);
|
||||
|
||||
@@ -73,6 +73,9 @@ export class WebApplication extends SNApplication {
|
||||
deinit(source: DeinitSource): void {
|
||||
super.deinit(source);
|
||||
try {
|
||||
if (source === DeinitSource.AppGroupUnload) {
|
||||
this.getThemeService().deactivateAllThemes();
|
||||
}
|
||||
for (const service of Object.values(this.webServices)) {
|
||||
if ('deinit' in service) {
|
||||
service.deinit?.(source);
|
||||
|
||||
@@ -44,14 +44,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
#account-switcher-icon {
|
||||
// When this icon is alone in the footer bar, it is displayed with too little
|
||||
// padding on the right, possibly due to the fact it is a raw SVG.
|
||||
&.alone {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
#account-panel,
|
||||
#sync-resolution-menu {
|
||||
width: 400px;
|
||||
|
||||
Reference in New Issue
Block a user