Feat: allow to disable questions (and to enable them again), fix #256

This commit is contained in:
Pieter Vander Vennet 2024-10-08 22:37:11 +02:00
parent f8ef32f123
commit 93ebdd8e16
8 changed files with 238 additions and 76 deletions

View file

@ -545,4 +545,14 @@ export default class UserRelatedState {
return amendedPrefs
}
/**
* The disabled questions for this theme and layer
*/
public getThemeDisabled(themeId: string, layerId: string): UIEventSource<string[]> {
const flatSource = this.osmConnection.getPreference("disabled-questions-" + themeId + "-" + layerId, "[]")
return UIEventSource.asObject<string[]>(flatSource, [])
}
}