Add feature switch to disable the cache, partial fix to make GRB theme workable again

This commit is contained in:
Pieter Vander Vennet 2024-08-02 13:32:47 +02:00
parent 0a7d48de5b
commit fda88fcccf
8 changed files with 47 additions and 31 deletions

View file

@ -57,6 +57,8 @@ export default class FeatureSwitchState extends OsmConnectionFeatureSwitches {
public readonly featureSwitchBackToThemeOverview: UIEventSource<boolean>
public readonly featureSwitchShareScreen: UIEventSource<boolean>
public readonly featureSwitchGeolocation: UIEventSource<boolean>
public readonly featureSwitchCache: UIEventSource<boolean>
public readonly featureSwitchIsTesting: UIEventSource<boolean>
public readonly featureSwitchIsDebugging: UIEventSource<boolean>
public readonly featureSwitchShowAllQuestions: UIEventSource<boolean>
@ -176,6 +178,13 @@ export default class FeatureSwitchState extends OsmConnectionFeatureSwitches {
"Enable the export as GeoJSON and CSV button"
)
this.featureSwitchCache = FeatureSwitchUtils.initSwitch(
"fs-cache",
layoutToUse?.enableCache ?? true,
"Enable/disable caching from localStorage"
)
let testingDefaultValue = false
if (
!Utils.runningFromConsole &&