Refactor svelte/legacy functions to svelte 5 syntax

This commit is contained in:
kwaroran
2024-10-23 21:03:34 +09:00
parent f078292843
commit 9add01cda2
24 changed files with 201 additions and 216 deletions

View File

@@ -1,6 +1,4 @@
<script lang="ts">
import { run } from 'svelte/legacy';
import { getCustomBackground, getEmotion } from "../../ts/util";
import { DataBase } from "../../ts/storage/database";
import BackgroundDom from "../ChatScreens/BackgroundDom.svelte";
@@ -12,7 +10,7 @@
let forceRender:() => void = $state()
let bgImg= $state('')
let lastBg = $state('')
run(() => {
$effect.pre(() => {
(async () =>{
if($DataBase.customBackground !== lastBg){
lastBg = $DataBase.customBackground