refactor: rename loadSingleton to reloadSingleton
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user