Fix: see #2212: actually save custom themes as visited

This commit is contained in:
Pieter Vander Vennet 2024-10-17 02:10:25 +02:00
parent 91f5c8f166
commit 9427083939
19 changed files with 129 additions and 75 deletions

View file

@ -55,7 +55,6 @@
const customThemes: Store<MinimalLayoutInformation[]> = Stores.ListStabilized<string>(state.installedUserThemes)
.mapD(stableIds => Utils.NoNullInplace(stableIds.map(id => state.getUnofficialTheme(id))))
function filtered(themes: Store<MinimalLayoutInformation[]>): Store<MinimalLayoutInformation[]> {
return searchStable.map(search => {
if (!search) {

View file

@ -42,8 +42,8 @@
})
}
let customWidth = LocalStorageSource.Get("custom-png-width", "20")
let customHeight = LocalStorageSource.Get("custom-png-height", "20")
let customWidth = LocalStorageSource.get("custom-png-width", "20")
let customHeight = LocalStorageSource.get("custom-png-height", "20")
async function offerCustomPng(): Promise<Blob> {
console.log(

View file

@ -24,7 +24,7 @@
export let coordinate: UIEventSource<{ lon: number; lat: number }>
export let state: SpecialVisualizationState
let comment: UIEventSource<string> = LocalStorageSource.Get("note-text")
let comment: UIEventSource<string> = LocalStorageSource.get("note-text")
let created = false
let notelayer: FilteredLayer = state.layerState.filteredLayers.get("note")

View file

@ -37,7 +37,7 @@ export abstract class EditJsonState<T> {
public readonly osmConnection: OsmConnection
public readonly showIntro: UIEventSource<"no" | "intro" | "tagrenderings"> = <any>(
LocalStorageSource.Get("studio-show-intro", "intro")
LocalStorageSource.get("studio-show-intro", "intro")
)
public readonly expertMode: UIEventSource<boolean>

View file

@ -29,7 +29,7 @@
const store = state.getStoreFor(path)
let value = store.data
let hasSeenIntro = UIEventSource.asBoolean(
LocalStorageSource.Get("studio-seen-tagrendering-tutorial", "false")
LocalStorageSource.get("studio-seen-tagrendering-tutorial", "false")
)
onMount(() => {
if (!hasSeenIntro.data) {

View file

@ -74,7 +74,7 @@ export default class Locale {
if (typeof navigator !== "undefined") {
browserLanguage = Locale.getBestSupportedLanguage()
}
source = LocalStorageSource.Get("language", browserLanguage)
source = LocalStorageSource.get("language", browserLanguage)
}
if (!Utils.runningFromConsole && typeof document !== undefined) {