From 049b8581254a5eb89db6572721de161ed20b1aa5 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Sat, 22 Dec 2018 11:43:33 -0700 Subject: [PATCH] Fix crash when update corresponds to a move. reloading during performBatchUpdates requires the *original* indexPath, not the new index path. --- .../ConversationView/ConversationViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index ee52ec121..f00b94a97 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -4463,7 +4463,7 @@ typedef enum : NSUInteger { } case ConversationUpdateItemType_Update: { [self.collectionView reloadItemsAtIndexPaths:@[ - [NSIndexPath indexPathForRow:(NSInteger)updateItem.newIndex inSection:section] + [NSIndexPath indexPathForRow:(NSInteger)updateItem.oldIndex inSection:section] ]]; hasUpdated = YES; break;