mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
"Mark as unread" dot appears on rooms that are actually unread, not marked as such (#7352)
* fix green dot only to appear for marked action
This commit is contained in:
parent
50f1fc8743
commit
1f8f6ffdf1
4 changed files with 17 additions and 8 deletions
|
@ -92,12 +92,17 @@
|
|||
self.lastEventDecriptionLabelTrailingConstraint.constant = self.unsentImageView.hidden ? 10 : 30;
|
||||
|
||||
// Notify unreads and bing
|
||||
if (roomCellData.hasUnread)
|
||||
if (roomCellData.isRoomMarkedAsUnread)
|
||||
{
|
||||
|
||||
self.missedNotifAndUnreadBadgeBgView.hidden = NO;
|
||||
self.missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.tintColor;
|
||||
self.missedNotifAndUnreadBadgeBgViewWidthConstraint.constant = 20;
|
||||
}
|
||||
else if (roomCellData.hasUnread)
|
||||
{
|
||||
self.missedNotifAndUnreadIndicator.hidden = NO;
|
||||
if (0 < roomCellData.notificationCount)
|
||||
{
|
||||
self.missedNotifAndUnreadIndicator.hidden = NO;
|
||||
self.missedNotifAndUnreadIndicator.backgroundColor = roomCellData.highlightCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor;
|
||||
|
||||
self.missedNotifAndUnreadBadgeBgView.hidden = NO;
|
||||
|
@ -110,9 +115,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
self.missedNotifAndUnreadBadgeBgView.hidden = NO;
|
||||
self.missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.tintColor;
|
||||
self.missedNotifAndUnreadBadgeBgViewWidthConstraint.constant = 20;
|
||||
self.missedNotifAndUnreadIndicator.backgroundColor = ThemeService.shared.theme.unreadRoomIndentColor;
|
||||
}
|
||||
|
||||
// Use bold font for the room title
|
||||
|
|
|
@ -63,8 +63,12 @@
|
|||
|
||||
- (BOOL)hasUnread
|
||||
{
|
||||
bool isRoomUnread = [[self mxSession] isRoomMarkedAsUnread:roomSummary.roomId];
|
||||
return (roomSummary.localUnreadEventCount != 0 || isRoomUnread);
|
||||
return (roomSummary.localUnreadEventCount != 0);
|
||||
}
|
||||
|
||||
- (BOOL)isRoomMarkedAsUnread
|
||||
{
|
||||
return [[self mxSession] isRoomMarkedAsUnread:roomSummary.roomId];;
|
||||
}
|
||||
|
||||
- (NSString *)roomIdentifier
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
@property (nonatomic, readonly) NSString *lastEventDate;
|
||||
|
||||
@property (nonatomic, readonly) BOOL hasUnread;
|
||||
@property (nonatomic, readonly) BOOL isRoomMarkedAsUnread;
|
||||
@property (nonatomic, readonly) NSUInteger notificationCount;
|
||||
@property (nonatomic, readonly) NSUInteger highlightCount;
|
||||
@property (nonatomic, readonly) NSString *notificationCountStringValue;
|
||||
|
|
1
changelog.d/7530.bugfix
Normal file
1
changelog.d/7530.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixes #7350 - Fix green dot only to appear for marked action
|
Loading…
Reference in a new issue