From 3251f8b14d78ca6aab212a642fcd7f0a317f35d6 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 19 Jul 2025 12:44:23 +0400 Subject: [PATCH] refac --- src/lib/components/layout/Sidebar.svelte | 3 ++- src/lib/components/layout/Sidebar/RecursiveFolder.svelte | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 4bcfa542e8..b053de8ecf 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -737,8 +737,9 @@ createFolder(); }} onAddLabel={$i18n.t('New Folder')} - on:change={(e) => { + on:change={async (e) => { selectedFolder.set(null); + await goto('/'); }} on:import={(e) => { importChatHandler(e.detail); diff --git a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte index db2d8d3a55..24e30e0a6a 100644 --- a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte +++ b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte @@ -426,10 +426,9 @@ renameHandler(); }} on:click={async (e) => { + await goto('/'); + selectedFolder.set(folders[folderId]); - if ($chatId) { - await goto('/'); - } }} >