fix: shift delete

This commit is contained in:
Timothy J. Baek 2024-06-16 10:27:34 -06:00
parent a4810a5e42
commit 5d0b77e64a
2 changed files with 8 additions and 4 deletions

View File

@ -464,9 +464,13 @@
on:select={() => {
selectedChatId = chat.id;
}}
on:delete={() => {
deleteChat = chat;
showDeleteConfirm = true;
on:delete={(e) => {
if ((e?.detail ?? '') === 'shift') {
deleteChatHandler(chat.id);
} else {
deleteChat = chat;
showDeleteConfirm = true;
}
}}
/>
{/each}

View File

@ -201,7 +201,7 @@
<button
class=" self-center dark:hover:text-white transition"
on:click={() => {
deleteChat(chat.id);
dispatch('delete', 'shift');
}}
type="button"
>