mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 07:27:42 +02:00
UX Rework: Add home page
- reduce room avatar size - improve badge display https://github.com/vector-im/riot-meta/issues/75
This commit is contained in:
@@ -24,6 +24,24 @@
|
||||
// self.roomDisplayname returns this value instead of the mother class.
|
||||
@synthesize roomDisplayname;
|
||||
|
||||
- (NSString*)notificationCountStringValue
|
||||
{
|
||||
NSString *stringValue;
|
||||
NSUInteger notificationCount = self.notificationCount;
|
||||
|
||||
if (notificationCount > 1000)
|
||||
{
|
||||
CGFloat value = notificationCount / 1000.0;
|
||||
stringValue = [NSString stringWithFormat:NSLocalizedStringFromTable(@"large_badge_value_k_format", @"Vector", nil), value];
|
||||
}
|
||||
else
|
||||
{
|
||||
stringValue = [NSString stringWithFormat:@"%tu", notificationCount];
|
||||
}
|
||||
|
||||
return stringValue;
|
||||
}
|
||||
|
||||
- (NSUInteger)notificationCount
|
||||
{
|
||||
// Ignore the regular notification count if the room is in 'mentions only" mode at the Riot level.
|
||||
|
||||
Reference in New Issue
Block a user