mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 08:55:12 -05:00
fix: the open folder page follows a rename, move or Mark all as read done in the sidebar (#34388)
This commit is contained in:
3 files changed
+11
-4
No files matched your search
@@ -35,6 +35,7 @@
|
||||
allLoaded,
|
||||
loadNextChatListPage,
|
||||
refreshChatList,
|
||||
refreshFolderChatLists,
|
||||
refreshSidebar,
|
||||
registerFolderRefreshHandler,
|
||||
setAllChatsRead,
|
||||
@@ -1753,7 +1754,8 @@
|
||||
const res = await toggleChatPinnedStatusById(localStorage.token, chat.id);
|
||||
}
|
||||
|
||||
initChatList();
|
||||
await initChatList();
|
||||
void refreshFolderChatLists();
|
||||
}
|
||||
} else if (type === 'folder') {
|
||||
if (folders[id].parent_id === null) {
|
||||
@@ -1858,7 +1860,8 @@
|
||||
);
|
||||
}
|
||||
|
||||
initChatList();
|
||||
await initChatList();
|
||||
void refreshFolderChatLists();
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
settings,
|
||||
user
|
||||
} from '$lib/stores';
|
||||
import { refreshChatList, refreshSidebar } from '$lib/stores/chatList';
|
||||
import { refreshSidebar } from '$lib/stores/chatList';
|
||||
import { updateFolderChatLists } from '$lib/stores/folderStates';
|
||||
import { closeChatTabs } from '$lib/stores/chatViewStates';
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
_chatTitle.set(title);
|
||||
}
|
||||
|
||||
await refreshChatList(localStorage.token, { refreshPinned: true });
|
||||
await refreshSidebar(localStorage.token);
|
||||
|
||||
dispatch('change');
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
updateFolderDetails, removeFolderState, beginFolderOpening, isCurrentFolderOpening,
|
||||
isCancelledFolderRequest
|
||||
} from '$lib/stores/folderStates';
|
||||
import { refreshFolderChatLists } from '$lib/stores/chatList';
|
||||
|
||||
import {
|
||||
deleteFolderById,
|
||||
@@ -154,6 +155,7 @@
|
||||
|
||||
if (typeof data?.last_read_at === 'number') {
|
||||
updateFolderChatLists({ id: data.chat_id, last_read_at: data.last_read_at });
|
||||
void refreshFolderChatLists();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -175,6 +177,7 @@
|
||||
}
|
||||
|
||||
for (const id of res.folder_ids ?? [folderId]) markFolderRead(id, $user?.id);
|
||||
void refreshFolderChatLists();
|
||||
};
|
||||
|
||||
$: isWritable = !folders[folderId]?.shared || folders[folderId]?.permission === 'write';
|
||||
@@ -303,6 +306,7 @@
|
||||
|
||||
if (res) {
|
||||
dispatch('update');
|
||||
void refreshFolderChatLists();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user