refactor: rename loadSingleton to reloadSingleton

This commit is contained in:
Johnny Almonte
2020-06-24 08:34:04 -04:00
parent afe4512a0a
commit cec1ec9d7e

View File

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