Respond to CR.

This commit is contained in:
Matthew Chen 2018-06-27 13:15:31 -04:00
parent dc86bee5d1
commit 227234d8cb
3 changed files with 3 additions and 4 deletions

View File

@ -3313,10 +3313,13 @@ typedef enum : NSUInteger {
ConversationViewItem *_Nullable viewItem = self.viewItemCache[collectionKey.key];
if (viewItem) {
[self reloadInteractionForViewItem:viewItem];
} else {
hasMalformedRowChange = YES;
}
} else if (rowChange.indexPath && rowChange.originalIndex < self.viewItems.count) {
// Do nothing, this is a pseudo-update generated due to
// setCellDrawingDependencyOffsets.
OWSAssert(rowChange.changes == YapDatabaseViewChangedDependency);
} else {
hasMalformedRowChange = YES;
}
@ -4807,7 +4810,6 @@ typedef enum : NSUInteger {
transaction:transaction
conversationStyle:self.conversationStyle];
}
viewItem.row = (NSInteger)row;
[viewItems addObject:viewItem];
OWSAssert(!viewItemCache[interaction.uniqueId]);
viewItemCache[interaction.uniqueId] = viewItem;

View File

@ -60,8 +60,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType);
// Used to suppress "group sender" avatars.
@property (nonatomic) BOOL shouldHideAvatar;
@property (nonatomic) NSInteger row;
@property (nonatomic, readonly) ConversationStyle *conversationStyle;
- (instancetype)init NS_UNAVAILABLE;

View File

@ -92,7 +92,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
_interaction = interaction;
_isGroupThread = isGroupThread;
_conversationStyle = conversationStyle;
self.row = NSNotFound;
[self ensureViewState:transaction];