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,9 +36,9 @@
id kAppDelegateDidTapStatusBarNotificationObserver;
/**
Observe kRiotDesignValuesDidChangeThemeNotification to handle user interface theme change.
Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
*/
id kRiotDesignValuesDidChangeThemeNotificationObserver;
id kThemeServiceDidChangeThemeNotificationObserver;
}
@end
@@ -94,7 +94,7 @@
self.contactsTableView.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];
@@ -104,12 +104,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.contactsTableView.backgroundColor = ((self.contactsTableView.style == UITableViewStylePlain) ? RiotDesignValues.theme.backgroundColor : RiotDesignValues.theme.headerBackgroundColor);
self.contactsTableView.backgroundColor = ((self.contactsTableView.style == UITableViewStylePlain) ? ThemeService.theme.backgroundColor : ThemeService.theme.headerBackgroundColor);
self.view.backgroundColor = self.contactsTableView.backgroundColor;
if (self.contactsTableView.dataSource)
@@ -120,7 +120,7 @@
- (UIStatusBarStyle)preferredStatusBarStyle
{
return RiotDesignValues.theme.statusBarStyle;
return ThemeService.theme.statusBarStyle;
}
- (void)didReceiveMemoryWarning
@@ -133,10 +133,10 @@
{
[super destroy];
if (kRiotDesignValuesDidChangeThemeNotificationObserver)
if (kThemeServiceDidChangeThemeNotificationObserver)
{
[[NSNotificationCenter defaultCenter] removeObserver:kRiotDesignValuesDidChangeThemeNotificationObserver];
kRiotDesignValuesDidChangeThemeNotificationObserver = nil;
[[NSNotificationCenter defaultCenter] removeObserver:kThemeServiceDidChangeThemeNotificationObserver];
kThemeServiceDidChangeThemeNotificationObserver = nil;
}
}
@@ -288,13 +288,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
{