From a1bd2f66f8674a0f531a067daa9d0c7e2e5cc7db Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Apr 2017 12:07:51 -0400 Subject: [PATCH 1/2] Fix invalid assert in the OWS table views. // FREEBIE --- Signal/src/ViewControllers/OWSTableViewController.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Signal/src/ViewControllers/OWSTableViewController.m b/Signal/src/ViewControllers/OWSTableViewController.m index c52de24e0..5e5242e7d 100644 --- a/Signal/src/ViewControllers/OWSTableViewController.m +++ b/Signal/src/ViewControllers/OWSTableViewController.m @@ -149,7 +149,6 @@ NS_ASSUME_NONNULL_BEGIN if (_customCellBlock) { return _customCellBlock(); } - OWSAssert(0); return nil; } From 74820d9ba92a9554abd6dc1a83d213e9fd306a76 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Apr 2017 15:30:21 -0400 Subject: [PATCH 2/2] Respond to CR. // FREEBIE --- Signal/src/ViewControllers/OWSTableViewController.h | 4 ++-- Signal/src/ViewControllers/OWSTableViewController.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Signal/src/ViewControllers/OWSTableViewController.h b/Signal/src/ViewControllers/OWSTableViewController.h index 02c0e3a3f..8685b38ae 100644 --- a/Signal/src/ViewControllers/OWSTableViewController.h +++ b/Signal/src/ViewControllers/OWSTableViewController.h @@ -37,7 +37,7 @@ typedef NS_ENUM(NSInteger, OWSTableItemType) { }; typedef void (^OWSTableActionBlock)(); -typedef UITableViewCell * (^OWSTableCustomCellBlock)(); +typedef UITableViewCell *_Nonnull (^OWSTableCustomCellBlock)(); @interface OWSTableItem : NSObject @@ -54,7 +54,7 @@ typedef UITableViewCell * (^OWSTableCustomCellBlock)(); + (OWSTableItem *)itemWithCustomCellBlock:(OWSTableCustomCellBlock)customCellBlock actionBlock:(nullable OWSTableActionBlock)actionBlock; -- (UITableViewCell *)customCell; +- (nullable UITableViewCell *)customCell; - (NSNumber *)customRowHeight; @end diff --git a/Signal/src/ViewControllers/OWSTableViewController.m b/Signal/src/ViewControllers/OWSTableViewController.m index 5e5242e7d..1d131d9e5 100644 --- a/Signal/src/ViewControllers/OWSTableViewController.m +++ b/Signal/src/ViewControllers/OWSTableViewController.m @@ -141,7 +141,7 @@ NS_ASSUME_NONNULL_BEGIN return item; } -- (UITableViewCell *)customCell +- (nullable UITableViewCell *)customCell { if (_customCell) { return _customCell;