Page MenuHomePhorge

D4615.1765133293.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D4615.1765133293.diff

diff --git a/web/chat/thread-list-provider.js b/web/chat/thread-list-provider.js
--- a/web/chat/thread-list-provider.js
+++ b/web/chat/thread-list-provider.js
@@ -218,15 +218,30 @@
makeSureActivePendingThreadIsIncluded,
makeSureActiveSidebarIsIncluded,
]);
+
+ const isChatCreationMode = useSelector(
+ state => state.navInfo.chatMode === 'create',
+ );
+
+ const orderedThreadList = React.useMemo(() => {
+ if (!isChatCreationMode) {
+ return threadList;
+ }
+ return [
+ ...threadList.filter(thread => thread.threadInfo.id === activeThreadID),
+ ...threadList.filter(thread => thread.threadInfo.id !== activeThreadID),
+ ];
+ }, [activeThreadID, isChatCreationMode, threadList]);
+
const threadListContext = React.useMemo(
() => ({
activeTab,
- threadList,
+ threadList: orderedThreadList,
setActiveTab,
searchText,
setSearchText,
}),
- [activeTab, threadList, searchText],
+ [activeTab, orderedThreadList, searchText],
);
return (
<ThreadListContext.Provider value={threadListContext}>

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 6:48 PM (18 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5844151
Default Alt Text
D4615.1765133293.diff (1 KB)

Event Timeline