You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-14 19:02:33 +03:00
98 -> 99+
This commit is contained in:
@@ -121,11 +121,12 @@ export function formatCommaSeparatedList(items: string[], itemLimit?: number): s
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formats a number into a 'minimal' badge count (9, 99, 99+).
|
* Formats a number into a 'minimal' badge count (9, 98, 99+).
|
||||||
* @param count The number to convert
|
* @param count The number to convert
|
||||||
* @returns The badge count, stringified.
|
* @returns The badge count, stringified.
|
||||||
*/
|
*/
|
||||||
export function formatMinimalBadgeCount(count: number): string {
|
export function formatMinimalBadgeCount(count: number): string {
|
||||||
if (count < 100) return count.toString();
|
// we specifically go from "98" to "99+"
|
||||||
|
if (count < 99) return count.toString();
|
||||||
return "99+";
|
return "99+";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user