[feat] suggestion unscribe

This commit is contained in:
kwaroran
2023-05-31 22:59:33 +09:00
parent 9bfa05babb
commit f397d5cb7c

View File

@@ -7,6 +7,7 @@
import { CopyIcon, LanguagesIcon, RefreshCcwIcon } from "lucide-svelte";
import { alertConfirm } from "src/ts/alert";
import { language } from "src/lang";
import { onDestroy } from "svelte";
export let send;
export let messageInput;
@@ -35,7 +36,7 @@
}
}
doingChat.subscribe((v) => {
const unsub = doingChat.subscribe((v) => {
if(v) {
progress=false
abortController?.abort()
@@ -87,6 +88,9 @@
}
}
}
onDestroy(unsub)
$: {translateSuggest(toggleTranslate, suggestMessages)}
</script>