Fix bug with strayclickhandler on desktop
This commit is contained in:
parent
9e6460030b
commit
fcfdbf56c5
2 changed files with 8 additions and 4 deletions
11
State.ts
11
State.ts
|
@ -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"));
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue