reskin: Rename RiotDesignValues -> ThemeService

This commit is contained in:
manuroe
2019-01-11 10:32:56 +01:00
parent eef759a8fa
commit 712a632120
123 changed files with 992 additions and 1004 deletions
@@ -36,8 +36,8 @@
// Current request in progress.
MXHTTPOperation *mxCurrentOperation;
// Observe kRiotDesignValuesDidChangeThemeNotification to handle user interface theme change.
id kRiotDesignValuesDidChangeThemeNotificationObserver;
// Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
id kThemeServiceDidChangeThemeNotificationObserver;
}
@end
@@ -58,10 +58,10 @@
dataSource = nil;
onCompleteBlock = nil;
if (kRiotDesignValuesDidChangeThemeNotificationObserver)
if (kThemeServiceDidChangeThemeNotificationObserver)
{
[[NSNotificationCenter defaultCenter] removeObserver:kRiotDesignValuesDidChangeThemeNotificationObserver];
kRiotDesignValuesDidChangeThemeNotificationObserver = nil;
[[NSNotificationCenter defaultCenter] removeObserver:kThemeServiceDidChangeThemeNotificationObserver];
kThemeServiceDidChangeThemeNotificationObserver = nil;
}
if (kAppDelegateDidTapStatusBarNotificationObserver)
@@ -110,7 +110,7 @@
self.tableView.tableFooterView = [[UIView alloc] init];
// Observe user interface theme change.
kRiotDesignValuesDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kRiotDesignValuesDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
[self userInterfaceThemeDidChange];
@@ -120,12 +120,12 @@
- (void)userInterfaceThemeDidChange
{
[RiotDesignValues.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
[ThemeService.theme applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.activityIndicator.backgroundColor = RiotDesignValues.theme.overlayBackgroundColor;
self.activityIndicator.backgroundColor = ThemeService.theme.overlayBackgroundColor;
// Check the table view style to select its bg color.
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor);
self.tableView.backgroundColor = ((self.tableView.style == UITableViewStylePlain) ? ThemeService.theme.backgroundColor : ThemeService.theme.headerBackgroundColor);
self.view.backgroundColor = self.tableView.backgroundColor;
if (self.tableView.dataSource)
@@ -136,7 +136,7 @@
- (UIStatusBarStyle)preferredStatusBarStyle
{
return RiotDesignValues.theme.statusBarStyle;
return ThemeService.theme.statusBarStyle;
}
- (void)viewWillAppear:(BOOL)animated
@@ -226,13 +226,13 @@
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
{
cell.backgroundColor = RiotDesignValues.theme.backgroundColor;
cell.backgroundColor = ThemeService.theme.backgroundColor;
// Update the selected background view
if (RiotDesignValues.theme.selectedBackgroundColor)
if (ThemeService.theme.selectedBackgroundColor)
{
cell.selectedBackgroundView = [[UIView alloc] init];
cell.selectedBackgroundView.backgroundColor = RiotDesignValues.theme.selectedBackgroundColor;
cell.selectedBackgroundView.backgroundColor = ThemeService.theme.selectedBackgroundColor;
}
else
{