Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 1bf273eb3a
commit cb827169fb

@ -48,7 +48,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
self.isExpectingMoreDevices = NO; self.isExpectingMoreDevices = NO;
self.tableView.rowHeight = UITableViewAutomaticDimension; self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 60; self.tableView.estimatedRowHeight = 60;
self.tableView.separatorColor = Theme.hairlineColor; self.tableView.separatorColor = Theme.cellSeparatorColor;
[self.tableView applyScrollViewInsetsFix]; [self.tableView applyScrollViewInsetsFix];

@ -96,7 +96,7 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
self.view = UIView() self.view = UIView()
let tableView = UITableView() let tableView = UITableView()
self.tableView = tableView self.tableView = tableView
self.tableView.separatorColor = Theme.hairlineColor self.tableView.separatorColor = Theme.cellSeparatorColor
view.addSubview(tableView) view.addSubview(tableView)
tableView.autoPinEdgesToSuperviewEdges() tableView.autoPinEdgesToSuperviewEdges()

@ -60,7 +60,7 @@ class ConversationSearchViewController: UITableViewController {
tableView.rowHeight = UITableViewAutomaticDimension tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 60 tableView.estimatedRowHeight = 60
tableView.separatorColor = Theme.hairlineColor tableView.separatorColor = Theme.cellSeparatorColor
tableView.register(EmptySearchResultCell.self, forCellReuseIdentifier: EmptySearchResultCell.reuseIdentifier) tableView.register(EmptySearchResultCell.self, forCellReuseIdentifier: EmptySearchResultCell.reuseIdentifier)
tableView.register(HomeViewCell.self, forCellReuseIdentifier: HomeViewCell.cellReuseIdentifier()) tableView.register(HomeViewCell.self, forCellReuseIdentifier: HomeViewCell.cellReuseIdentifier())
@ -278,10 +278,10 @@ class ConversationSearchViewController: UITableViewController {
} }
override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
guard let view = self.tableView(tableView, viewForHeaderInSection: section) else { guard nil != self.tableView(tableView, titleForHeaderInSection: section) else {
return 0 return 0
} }
return view.height() return UITableViewAutomaticDimension
} }
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
@ -294,7 +294,6 @@ class ConversationSearchViewController: UITableViewController {
label.text = title label.text = title
label.font = UIFont.ows_dynamicTypeBody.ows_mediumWeight() label.font = UIFont.ows_dynamicTypeBody.ows_mediumWeight()
label.tag = section label.tag = section
label.sizeToFit()
let hMargin: CGFloat = 15 let hMargin: CGFloat = 15
let vMargin: CGFloat = 4 let vMargin: CGFloat = 4
@ -303,7 +302,6 @@ class ConversationSearchViewController: UITableViewController {
wrapper.addSubview(label) wrapper.addSubview(label)
label.autoPinWidthToSuperview(withMargin: hMargin) label.autoPinWidthToSuperview(withMargin: hMargin)
label.autoPinHeightToSuperview(withMargin: vMargin) label.autoPinHeightToSuperview(withMargin: vMargin)
wrapper.frame = CGRect(x: 0, y: 0, width: label.width() + 2 * hMargin, height: label.height() + 2 * vMargin)
return wrapper return wrapper
} }

@ -318,7 +318,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
self.tableView.delegate = self; self.tableView.delegate = self;
self.tableView.dataSource = self; self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.separatorColor = Theme.hairlineColor; self.tableView.separatorColor = Theme.cellSeparatorColor;
[self.tableView registerClass:[HomeViewCell class] forCellReuseIdentifier:HomeViewCell.cellReuseIdentifier]; [self.tableView registerClass:[HomeViewCell class] forCellReuseIdentifier:HomeViewCell.cellReuseIdentifier];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kArchivedConversationsReuseIdentifier]; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:kArchivedConversationsReuseIdentifier];
[self.view addSubview:self.tableView]; [self.view addSubview:self.tableView];

@ -721,7 +721,7 @@ NSString *const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
self.view.backgroundColor = Theme.backgroundColor; self.view.backgroundColor = Theme.backgroundColor;
self.tableView.backgroundColor = Theme.backgroundColor; self.tableView.backgroundColor = Theme.backgroundColor;
self.tableView.separatorColor = Theme.hairlineColor; self.tableView.separatorColor = Theme.cellSeparatorColor;
} }
@end @end

@ -124,7 +124,7 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
+ (UIColor *)cellSeparatorColor + (UIColor *)cellSeparatorColor
{ {
return [UIColor colorWithWhite:0.78f alpha:1]; return Theme.hairlineColor;
} }
+ (UIColor *)conversationButtonBackgroundColor + (UIColor *)conversationButtonBackgroundColor

Loading…
Cancel
Save