This commit is contained in:
Timothy Jaeryang Baek 2025-07-13 03:50:35 +04:00
parent 217bd440c3
commit 6f55679a8a

View file

@ -25,7 +25,8 @@
pinnedChats,
showSidebar,
currentChatPage,
tags
tags,
selectedFolder
} from '$lib/stores';
import ChatMenu from './ChatMenu.svelte';
@ -355,6 +356,13 @@
on:click={() => {
dispatch('select');
if (
$selectedFolder &&
!($selectedFolder?.items?.chats.map((chat) => chat.id) ?? []).includes(id)
) {
selectedFolder.set(null); // Reset selected folder if the chat is not in it
}
if ($mobile) {
showSidebar.set(false);
}