Skip to content

Commit f4f6945

Browse files
committed
fix(threads): sort list by ms timestamps
1 parent ad0f19f commit f4f6945

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/features/threads/hooks/useThreads.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,8 @@ export function useThreads({
889889
uniqueThreads.sort((a, b) => {
890890
const aId = String(a?.id ?? "");
891891
const bId = String(b?.id ?? "");
892-
const aCreated = Number(a?.createdAt ?? a?.created_at ?? 0);
893-
const bCreated = Number(b?.createdAt ?? b?.created_at ?? 0);
892+
const aCreated = getThreadTimestamp(a);
893+
const bCreated = getThreadTimestamp(b);
894894
const aActivity = Math.max(activityByThread[aId] ?? 0, aCreated);
895895
const bActivity = Math.max(activityByThread[bId] ?? 0, bCreated);
896896
return bActivity - aActivity;

0 commit comments

Comments
 (0)