Default to created time if no chat activity
This commit is contained in:
parent
f393246e4f
commit
a247e6d0de
|
@ -68,10 +68,10 @@ export function listenForMemberGroups(
|
||||||
const q = query(groups, where('memberIds', 'array-contains', userId))
|
const q = query(groups, where('memberIds', 'array-contains', userId))
|
||||||
const sorter = (group: Group) => {
|
const sorter = (group: Group) => {
|
||||||
if (sort?.by === 'mostRecentChatActivityTime') {
|
if (sort?.by === 'mostRecentChatActivityTime') {
|
||||||
return group.mostRecentChatActivityTime ?? group.mostRecentActivityTime
|
return group.mostRecentChatActivityTime ?? group.createdTime
|
||||||
}
|
}
|
||||||
if (sort?.by === 'mostRecentContractAddedTime') {
|
if (sort?.by === 'mostRecentContractAddedTime') {
|
||||||
return group.mostRecentContractAddedTime ?? group.mostRecentActivityTime
|
return group.mostRecentContractAddedTime ?? group.createdTime
|
||||||
}
|
}
|
||||||
return group.mostRecentActivityTime
|
return group.mostRecentActivityTime
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user