Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32210895
D4615.1765133293.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4615.1765133293.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4615: [web] Move selected chat to the top of the list in creation mode
Attached
Detach File
Event Timeline
Log In to Comment