"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:
Flescio
2023-02-09 09:01:16 +01:00
committed by GitHub
parent ca6181252a
commit 9ecfe523aa
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