We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad0f19f commit f4f6945Copy full SHA for f4f6945
1 file changed
src/features/threads/hooks/useThreads.ts
@@ -889,8 +889,8 @@ export function useThreads({
889
uniqueThreads.sort((a, b) => {
890
const aId = String(a?.id ?? "");
891
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);
+ const aCreated = getThreadTimestamp(a);
+ const bCreated = getThreadTimestamp(b);
894
const aActivity = Math.max(activityByThread[aId] ?? 0, aCreated);
895
const bActivity = Math.max(activityByThread[bId] ?? 0, bCreated);
896
return bActivity - aActivity;
0 commit comments