From a247e6d0de37c5cf6dacf7ed5e548b8deba5ca85 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 18 Jul 2022 07:38:02 -0600 Subject: [PATCH] Default to created time if no chat activity --- web/lib/firebase/groups.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/lib/firebase/groups.ts b/web/lib/firebase/groups.ts index e49b012a..6dfc1b88 100644 --- a/web/lib/firebase/groups.ts +++ b/web/lib/firebase/groups.ts @@ -68,10 +68,10 @@ export function listenForMemberGroups( const q = query(groups, where('memberIds', 'array-contains', userId)) const sorter = (group: Group) => { if (sort?.by === 'mostRecentChatActivityTime') { - return group.mostRecentChatActivityTime ?? group.mostRecentActivityTime + return group.mostRecentChatActivityTime ?? group.createdTime } if (sort?.by === 'mostRecentContractAddedTime') { - return group.mostRecentContractAddedTime ?? group.mostRecentActivityTime + return group.mostRecentContractAddedTime ?? group.createdTime } return group.mostRecentActivityTime }