[feat] suggestion unscribe
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
import { CopyIcon, LanguagesIcon, RefreshCcwIcon } from "lucide-svelte";
|
import { CopyIcon, LanguagesIcon, RefreshCcwIcon } from "lucide-svelte";
|
||||||
import { alertConfirm } from "src/ts/alert";
|
import { alertConfirm } from "src/ts/alert";
|
||||||
import { language } from "src/lang";
|
import { language } from "src/lang";
|
||||||
|
import { onDestroy } from "svelte";
|
||||||
|
|
||||||
export let send;
|
export let send;
|
||||||
export let messageInput;
|
export let messageInput;
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doingChat.subscribe((v) => {
|
const unsub = doingChat.subscribe((v) => {
|
||||||
if(v) {
|
if(v) {
|
||||||
progress=false
|
progress=false
|
||||||
abortController?.abort()
|
abortController?.abort()
|
||||||
@@ -87,6 +88,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDestroy(unsub)
|
||||||
|
|
||||||
$: {translateSuggest(toggleTranslate, suggestMessages)}
|
$: {translateSuggest(toggleTranslate, suggestMessages)}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user