mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac
This commit is contained in:
parent
217bd440c3
commit
6f55679a8a
1 changed files with 9 additions and 1 deletions
|
|
@ -25,7 +25,8 @@
|
||||||
pinnedChats,
|
pinnedChats,
|
||||||
showSidebar,
|
showSidebar,
|
||||||
currentChatPage,
|
currentChatPage,
|
||||||
tags
|
tags,
|
||||||
|
selectedFolder
|
||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
|
|
||||||
import ChatMenu from './ChatMenu.svelte';
|
import ChatMenu from './ChatMenu.svelte';
|
||||||
|
|
@ -355,6 +356,13 @@
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
dispatch('select');
|
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) {
|
if ($mobile) {
|
||||||
showSidebar.set(false);
|
showSidebar.set(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue