Fix bug with strayclickhandler on desktop

This commit is contained in:
Pieter Vander Vennet 2020-09-15 14:00:31 +02:00
parent 9e6460030b
commit fcfdbf56c5
2 changed files with 8 additions and 4 deletions

View file

@ -36,6 +36,7 @@ export class StrayClickHandler {
self._lastMarker.on("click", () => {
State.state.fullScreenMessage.setData(self._uiToShow());
uiElement.Update();
});
});

View file

@ -173,10 +173,6 @@ export class State {
);
this.favouriteLayers = this.osmConnection.GetLongPreference("favouriteLayers").map(
str => Utils.Dedup(str?.split(";")) ?? [],
[], layers => Utils.Dedup(layers)?.join(";")
);
this.installedThemes = this.osmConnection.preferencesHandler.preferences.map<{ layout: Layout, definition: string }[]>(allPreferences => {
const installedThemes: { layout: Layout, definition: string }[] = [];
@ -213,6 +209,13 @@ export class State {
});
// IMportant: the favourite layers are initiliazed _after_ the installed themes, as these might contain an installedTheme
this.favouriteLayers = this.osmConnection.GetLongPreference("favouriteLayers").map(
str => Utils.Dedup(str?.split(";")) ?? [],
[], layers => Utils.Dedup(layers)?.join(";")
);
Locale.language.syncWith(this.osmConnection.GetPreference("language"));