File tree Expand file tree Collapse file tree
apps/frontend/app/components/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ if ($auth.loggedIn) {
5252 // Keep threads that are not assigned to any users
5353 // Must reconstruct array or else it cant be cloned to IDB.
5454 threads .value = JSON .parse (JSON .stringify (
55- [... tFC , ... threads .value .filter (t => ! t .userId )],
55+ [
56+ ... threads .value .filter (t => ! t .userId ),
57+ ... tFC ,
58+ ].sort ((a , b ) => b .timestamp - a .timestamp ),
5659 ))
5760 })
5861 watch (fetchingFromConvex , (fFC ) => {
7275 // Must reconstruct array or else it cant be cloned to IDB.
7376 threads .value = JSON .parse (JSON .stringify (
7477 [
75- ... tFC .map (t => ({ ... t , lockerKey: getLockerKey (t ._id ) })),
7678 ... threads .value .filter (t => ! t .userId && t .sessionId !== $init .sessionId ),
77- ],
79+ ... tFC .map (t => ({ ... t , lockerKey: getLockerKey (t ._id ) })),
80+ ].sort ((a , b ) => b .timestamp - a .timestamp ),
7881 ))
7982 })
8083 watch (fetchingFromConvex , (fFC ) => {
You can’t perform that action at this time.
0 commit comments