Merge pull request #419 from standardnotes/fix-preferences-manager

fix: initialize userPreferences in preferencesManager
This commit is contained in:
Johnny A
2020-06-24 20:08:12 -04:00
committed by GitHub

View File

@@ -17,6 +17,7 @@ export class PreferencesManager extends ApplicationService {
/** @override */
async onAppLaunch() {
super.onAppLaunch();
this.reloadSingleton();
this.streamPreferences();
}
@@ -28,12 +29,12 @@ export class PreferencesManager extends ApplicationService {
this.application!.streamItems(
ContentType.UserPrefs,
() => {
this.loadSingleton();
this.reloadSingleton();
}
);
}
private async loadSingleton() {
private async reloadSingleton() {
if(this.loadingPrefs) {
return;
}