reskin: Create ThemeService.shared

This commit is contained in:
manuroe
2019-01-11 11:45:27 +01:00
parent 712a632120
commit 744a0b8d4f
112 changed files with 758 additions and 728 deletions
+9 -9
View File
@@ -114,19 +114,19 @@
- (void)userInterfaceThemeDidChange
{
[ThemeService.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
[ThemeService.shared.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.tabBar.tintColor = ThemeService.theme.tintColor;
self.tabBar.barTintColor = ThemeService.theme.headerBackgroundColor;
self.tabBar.tintColor = ThemeService.shared.theme.tintColor;
self.tabBar.barTintColor = ThemeService.shared.theme.headerBackgroundColor;
self.view.backgroundColor = ThemeService.theme.backgroundColor;
self.view.backgroundColor = ThemeService.shared.theme.backgroundColor;
[self setNeedsStatusBarAppearanceUpdate];
}
- (UIStatusBarStyle)preferredStatusBarStyle
{
return ThemeService.theme.statusBarStyle;
return ThemeService.shared.theme.statusBarStyle;
}
- (void)viewWillAppear:(BOOL)animated
@@ -786,7 +786,7 @@
{
_hidden = hidden;
[self.view superview].backgroundColor = ThemeService.theme.backgroundColor;
[self.view superview].backgroundColor = ThemeService.shared.theme.backgroundColor;
self.view.hidden = hidden;
self.navigationController.navigationBar.hidden = hidden;
}
@@ -798,15 +798,15 @@
// Use a middle dot to signal missed notif in favourites
[self setMissedDiscussionsMark:(recentsDataSource.missedFavouriteDiscussionsCount? @"\u00B7": nil)
onTabBarItem:TABBAR_FAVOURITES_INDEX
withBadgeColor:(recentsDataSource.missedHighlightFavouriteDiscussionsCount ? ThemeService.theme.notificationMentionColor : ThemeService.theme.notificationUnreadColor)];
withBadgeColor:(recentsDataSource.missedHighlightFavouriteDiscussionsCount ? ThemeService.shared.theme.notificationMentionColor : ThemeService.shared.theme.notificationUnreadColor)];
// Update the badge on People and Rooms tabs
[self setMissedDiscussionsCount:recentsDataSource.missedDirectDiscussionsCount
onTabBarItem:TABBAR_PEOPLE_INDEX
withBadgeColor:(recentsDataSource.missedHighlightDirectDiscussionsCount ? ThemeService.theme.notificationMentionColor : ThemeService.theme.notificationUnreadColor)];
withBadgeColor:(recentsDataSource.missedHighlightDirectDiscussionsCount ? ThemeService.shared.theme.notificationMentionColor : ThemeService.shared.theme.notificationUnreadColor)];
[self setMissedDiscussionsCount:recentsDataSource.missedGroupDiscussionsCount
onTabBarItem:TABBAR_ROOMS_INDEX
withBadgeColor:(recentsDataSource.missedHighlightGroupDiscussionsCount ? ThemeService.theme.notificationMentionColor : ThemeService.theme.notificationUnreadColor)];
withBadgeColor:(recentsDataSource.missedHighlightGroupDiscussionsCount ? ThemeService.shared.theme.notificationMentionColor : ThemeService.shared.theme.notificationUnreadColor)];
}
- (void)setMissedDiscussionsCount:(NSUInteger)count onTabBarItem:(NSUInteger)index withBadgeColor:(UIColor*)badgeColor