Refactoring fullscreenhandling

This commit is contained in:
Pieter Vander Vennet 2021-01-25 03:12:09 +01:00
parent e1a4c75391
commit 00f610c589
23 changed files with 346 additions and 245 deletions

View file

@ -4,7 +4,7 @@ import {Utils} from "../../Utils";
export class OsmPreferences {
public preferences = new UIEventSource<any>({});
public preferences = new UIEventSource<any>({}, "all-osm-preferences");
public preferenceSources: any = {}
private auth: any;
private userDetails: UIEventSource<UserDetails>;
@ -29,7 +29,7 @@ export class OsmPreferences {
return this.longPreferences[prefix + key];
}
const source = new UIEventSource<string>(undefined);
const source = new UIEventSource<string>(undefined, "long-osm-preference:"+prefix+key);
this.longPreferences[prefix + key] = source;
const allStartWith = prefix + key + "-combined";
@ -106,7 +106,7 @@ export class OsmPreferences {
if (this.userDetails.data.loggedIn && this.preferences.data[key] === undefined) {
this.UpdatePreferences();
}
const pref = new UIEventSource<string>(this.preferences.data[key]);
const pref = new UIEventSource<string>(this.preferences.data[key],"osm-preference:"+key);
pref.addCallback((v) => {
this.SetPreference(key, v);
});