Reskin: HomeVC: Use notices colors for badges background in section headers

#2292
This commit is contained in:
manuroe
2019-02-28 22:09:57 +00:00
parent 92c3ec6352
commit 9c806c4c6c
2 changed files with 5 additions and 2 deletions
@@ -584,10 +584,12 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
{
sectionArray = serverNoticeCellDataArray;
}
BOOL highlight = NO;
for (id<MXKRecentCellDataStoring> cellData in sectionArray)
{
count += cellData.notificationCount;
highlight |= (cellData.highlightCount > 0);
}
if (count)
@@ -611,7 +613,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
missedNotifAndUnreadBadgeBgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bgViewWidth, 20)];
[missedNotifAndUnreadBadgeBgView.layer setCornerRadius:10];
missedNotifAndUnreadBadgeBgView.backgroundColor = ThemeService.shared.theme.headerTextSecondaryColor;
missedNotifAndUnreadBadgeBgView.backgroundColor = highlight ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor;
[missedNotifAndUnreadBadgeBgView addSubview:missedNotifAndUnreadBadgeLabel];
missedNotifAndUnreadBadgeLabel.center = missedNotifAndUnreadBadgeBgView.center;