fix: deactivate themes when switching accounts

This commit is contained in:
Mo
2022-02-08 21:51:06 -06:00
parent e43c8a6f07
commit d920bf663f
4 changed files with 4 additions and 10 deletions

View File

@@ -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'

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;