Increase unread cap to 99+ (#10985)
This commit is contained in:
@@ -856,18 +856,16 @@ export function useUnreadMessageCount(): {
|
||||
const request = data?.unreadRequestConvos ?? 0
|
||||
|
||||
if (accepted > 0) {
|
||||
const total = accepted + Math.min(request, 1)
|
||||
return {
|
||||
count: total,
|
||||
count: accepted,
|
||||
// accepted is sentinel-capped at UNREAD_ACCEPTED_CAP (meaning "more than
|
||||
// cap - 1"). show the "+" overflow label only when accepted is actually
|
||||
// capped - the +1 request nudge must not trip it at exactly cap - 1
|
||||
// accepted convos. otherwise clamp the number to cap - 1 so the nudge
|
||||
// never surfaces the sentinel value (31) itself
|
||||
// capped, otherwise clamp the number to cap - 1 so we never surface the
|
||||
// sentinel value (100) itself
|
||||
numUnread:
|
||||
accepted >= UNREAD_ACCEPTED_CAP
|
||||
? `${UNREAD_ACCEPTED_CAP - 1}+`
|
||||
: String(Math.min(total, UNREAD_ACCEPTED_CAP - 1)),
|
||||
: String(Math.min(accepted, UNREAD_ACCEPTED_CAP - 1)),
|
||||
// only needed when numUnread is undefined
|
||||
hasNew: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user