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:
Giom Foret
2017-05-11 14:58:55 +02:00
parent ea633d59ff
commit acf88b3937
4 changed files with 46 additions and 25 deletions
+18
View File
@@ -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.