fix(core): save the chosen theme
ThemeManager called storage.set, which neither app's storage has, so choosing a theme threw and the choice was lost on reload.
This commit is contained in:
parent
193efd1458
commit
e0c66a1265
@ -13,7 +13,7 @@ export type ThemeManagerEvents = "themechange";
|
||||
|
||||
export class ThemeManager extends TinyEmitter {
|
||||
private _theme: Theme;
|
||||
private _storage: any;
|
||||
private _storage: Storage;
|
||||
private _themes: Theme[];
|
||||
// The first theme is the default.
|
||||
constructor(storage: Storage, themeList: Theme[] = themes) {
|
||||
@ -34,7 +34,7 @@ export class ThemeManager extends TinyEmitter {
|
||||
}
|
||||
|
||||
private writetToLocalStorage(value: Theme) {
|
||||
this._storage.set(THEME_ID, value.id);
|
||||
this._storage.setString(THEME_ID, value.id);
|
||||
}
|
||||
|
||||
private readFromLocalStorage(): Theme | undefined {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user