Performance: sprinkle 'onDestroy' everywhere to cleanup old stores; cleanup 'Stores' utility class

This commit is contained in:
Pieter Vander Vennet 2025-08-01 03:07:37 +02:00
parent 66f093afd8
commit 81be4db044
79 changed files with 332 additions and 325 deletions

View file

@ -11,6 +11,7 @@
import LoginToggle from "../../Base/LoginToggle.svelte"
import { writable } from "svelte/store"
import Loading from "../../Base/Loading.svelte"
import { onDestroy } from "svelte"
export let state: SpecialVisualizationState
export let tags: UIEventSource<Record<string, string>>
@ -29,7 +30,7 @@
}
const t = Translations.t.notes
let isClosed: Store<boolean> = tags.map((tags) => (tags?.["closed_at"] ?? "") !== "")
let isClosed: Store<boolean> = tags.map((tags) => (tags?.["closed_at"] ?? "") !== "", onDestroy)
let isProcessing = writable(false)
async function addComment() {