Clicking the popup doesn't cause the login to appear anymore

This commit is contained in:
Pieter Vander Vennet 2020-07-17 12:00:43 +02:00
parent 4bfe078836
commit 66e5808e4e

View file

@ -123,11 +123,12 @@ export class OsmConnection {
public preferenceSources : any = {}
public GetPreference(key: string) : UIEventSource<string>{
if(this.preferenceSources[key] !== undefined){
if (this.preferenceSources[key] !== undefined) {
return this.preferenceSources[key];
}
this.UpdatePreferences();
console.log("Getting preference object", key, "currently upstreamed as ",this.preferences.data[key] );
if (this.userDetails.data.loggedIn) {
this.UpdatePreferences();
}
const pref = new UIEventSource<string>(this.preferences.data[key]);
pref.addCallback((v) => {
this.SetPreference(key, v);