From d4db3dd593aeafb44f62e9eef40f49d5987f1c3c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 3 May 2024 16:18:11 -0700 Subject: [PATCH] fix: tag delete issue --- src/lib/components/chat/Tags.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/Tags.svelte b/src/lib/components/chat/Tags.svelte index 17ec064ee..277a47801 100644 --- a/src/lib/components/chat/Tags.svelte +++ b/src/lib/components/chat/Tags.svelte @@ -3,10 +3,11 @@ addTagById, deleteTagById, getAllChatTags, + getChatList, getTagsById, updateChatById } from '$lib/apis/chats'; - import { tags as _tags } from '$lib/stores'; + import { tags as _tags, chats } from '$lib/stores'; import { onMount } from 'svelte'; import Tags from '../common/Tags.svelte'; @@ -40,6 +41,10 @@ }); _tags.set(await getAllChatTags(localStorage.token)); + + if (!$_tags.includes(tagName)) { + await chats.set(await getChatList(localStorage.token)); + } }; onMount(async () => {