diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 40de5c66..014dfcf6 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -82,7 +82,10 @@ }); if (res) { - goto('/'); + if ($chatId === id) { + goto('/'); + } + await chats.set(await getChatList(localStorage.token)); } }; @@ -370,22 +373,22 @@ return title.includes(query) || contentMatches; } }) as chat, i} -
+
{#if chatTitleEditId === chat.id}
{:else} { if (window.innerWidth < 1024) { @@ -395,156 +398,152 @@ draggable="false" >
-
+
{chat.title}
{/if} - {#if chat.id === $chatId} -
- {#if chatTitleEditId === chat.id} -
- - + -
- {:else if chatDeleteId === chat.id} -
- +
+ {:else if chatDeleteId === chat.id} +
+ - + -
- {:else} -
- +
+ {:else} +
+ - + -
- {/if} -
- {/if} + + + +
+ {/if} +
{/each}