Respond to CR.

pull/1/head
Matthew Chen 6 years ago
parent b90e406a57
commit 2b1f928770

@ -66,8 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
_viewConstraints = [NSMutableArray new];
UIView *selectedBackgroundView = [UIView new];
selectedBackgroundView.backgroundColor = [(
Theme.isDarkThemeEnabled ? [UIColor ows_whiteColor] : [UIColor ows_blackColor]) colorWithAlphaComponent:0.08f];
selectedBackgroundView.backgroundColor = [Theme.cellSelectedColor colorWithAlphaComponent:0.08f];
self.selectedBackgroundView = selectedBackgroundView;

@ -384,11 +384,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
searchBar.placeholder = NSLocalizedString(@"HOME_VIEW_CONVERSATION_SEARCHBAR_PLACEHOLDER",
@"Placeholder text for search bar which filters conversations.");
searchBar.backgroundColor = Theme.backgroundColor;
if (Theme.isDarkThemeEnabled) {
searchBar.barStyle = UIBarStyleBlack;
} else {
searchBar.barStyle = UIBarStyleDefault;
}
searchBar.barStyle = Theme.barStyle;
searchBar.delegate = self;
[searchBar sizeToFit];

@ -103,11 +103,7 @@ NS_ASSUME_NONNULL_BEGIN
searchBar.delegate = self;
searchBar.placeholder = NSLocalizedString(@"SEARCH_BYNAMEORNUMBER_PLACEHOLDER_TEXT", @"");
searchBar.backgroundColor = [Theme backgroundColor];
if (Theme.isDarkThemeEnabled) {
searchBar.barStyle = UIBarStyleBlack;
} else {
searchBar.barStyle = UIBarStyleDefault;
}
searchBar.barStyle = Theme.barStyle;
[searchBar sizeToFit];
_tableViewController = [OWSTableViewController new];

@ -112,8 +112,7 @@ const CGFloat kOWSTable_DefaultCellHeight = 45.f;
cell.textLabel.textColor = [Theme primaryColor];
UIView *selectedBackgroundView = [UIView new];
selectedBackgroundView.backgroundColor =
[(Theme.isDarkThemeEnabled ? [UIColor ows_whiteColor] : [UIColor ows_blackColor]) colorWithAlphaComponent:0.08];
selectedBackgroundView.backgroundColor = [Theme.cellSelectedColor colorWithAlphaComponent:0.08];
cell.selectedBackgroundView = selectedBackgroundView;
}

@ -34,6 +34,12 @@ extern NSString *const NSNotificationNameThemeDidChange;
@property (class, readonly, nonatomic) UIColor *toolbarBackgroundColor;
+ (UIColor *)cellSelectedColor;
#pragma mark -
+ (UIBarStyle)barStyle;
@end
NS_ASSUME_NONNULL_END

@ -93,6 +93,21 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
return self.navbarBackgroundColor;
}
+ (UIColor *)cellSelectedColor
{
return (Theme.isDarkThemeEnabled ? UIColor.ows_whiteColor : UIColor.ows_blackColor);
}
#pragma mark -
+ (UIBarStyle)barStyle
{
if (Theme.isDarkThemeEnabled) {
return UIBarStyleBlack;
} else {
return UIBarStyleDefault;
}
}
@end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save