mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 23:18:21 +00:00
Fix room list sorted by recent on app startup (#9515)
This commit is contained in:
@@ -111,7 +111,7 @@ const getLastTs = (r: Room, userId: string) => {
|
|||||||
|
|
||||||
const threadLastEventTimestamps = r.getThreads().map(thread => {
|
const threadLastEventTimestamps = r.getThreads().map(thread => {
|
||||||
const event = thread.replyToEvent ?? thread.rootEvent;
|
const event = thread.replyToEvent ?? thread.rootEvent;
|
||||||
return event!.getTs();
|
return event?.getTs() ?? 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
return Math.max(mainTimelineLastTs, ...threadLastEventTimestamps);
|
return Math.max(mainTimelineLastTs, ...threadLastEventTimestamps);
|
||||||
|
|||||||
Reference in New Issue
Block a user