mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Respond to CR.
// FREEBIE
This commit is contained in:
parent
2bc1d44cd2
commit
45ae8fb067
|
@ -84,6 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
_tableViewController = [OWSTableViewController new];
|
||||
_tableViewController.delegate = self;
|
||||
_tableViewController.tableViewStyle = UITableViewStylePlain;
|
||||
[self.view addSubview:self.tableViewController.view];
|
||||
[_tableViewController.view autoPinWidthToSuperview];
|
||||
[_tableViewController.view autoPinEdgeToSuperviewEdge:ALEdgeTop];
|
||||
|
@ -258,11 +259,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
if ([self.nonContactAccountSet containsObject:phoneNumber]) {
|
||||
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{
|
||||
MessageComposeTableViewController *strongSelf = weakSelf;
|
||||
if (!strongSelf) {
|
||||
return (ContactTableViewCell *)nil;
|
||||
}
|
||||
|
||||
ContactTableViewCell *cell = [ContactTableViewCell new];
|
||||
BOOL isBlocked = [helper isRecipientIdBlocked:phoneNumber];
|
||||
if (isBlocked) {
|
||||
|
@ -302,11 +298,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
NSArray<SignalAccount *> *filteredSignalAccounts = [self filteredSignalAccounts];
|
||||
for (SignalAccount *signalAccount in filteredSignalAccounts) {
|
||||
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{
|
||||
MessageComposeTableViewController *strongSelf = weakSelf;
|
||||
if (!strongSelf) {
|
||||
return (ContactTableViewCell *)nil;
|
||||
}
|
||||
|
||||
ContactTableViewCell *cell = [ContactTableViewCell new];
|
||||
BOOL isBlocked = [helper isRecipientIdBlocked:signalAccount.recipientId];
|
||||
if (isBlocked) {
|
||||
|
|
|
@ -86,6 +86,8 @@ typedef UITableViewCell *_Nonnull (^OWSTableCustomCellBlock)();
|
|||
@property (nonatomic) OWSTableContents *contents;
|
||||
@property (nonatomic, readonly) UITableView *tableView;
|
||||
|
||||
@property (nonatomic) UITableViewStyle tableViewStyle;
|
||||
|
||||
#pragma mark - Presentation
|
||||
|
||||
- (void)presentFromViewController:(UIViewController *)fromViewController;
|
||||
|
|
|
@ -178,9 +178,13 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
|
|||
|
||||
- (instancetype)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
_contents = [OWSTableContents new];
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
[self commonInit];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -191,7 +195,7 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
|
|||
return self;
|
||||
}
|
||||
|
||||
_contents = [OWSTableContents new];
|
||||
[self commonInit];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -203,11 +207,17 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
|
|||
return self;
|
||||
}
|
||||
|
||||
_contents = [OWSTableContents new];
|
||||
[self commonInit];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)commonInit
|
||||
{
|
||||
_contents = [OWSTableContents new];
|
||||
self.tableViewStyle = UITableViewStyleGrouped;
|
||||
}
|
||||
|
||||
- (void)loadView
|
||||
{
|
||||
[super loadView];
|
||||
|
@ -218,7 +228,7 @@ NSString * const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
|
|||
self.title = self.contents.title;
|
||||
}
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:self.tableViewStyle];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
|
|
Loading…
Reference in a new issue