diff --git a/Firestore/FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.m b/Firestore/FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.m index 6048f467719..0ceee978a59 100644 --- a/Firestore/FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.m +++ b/Firestore/FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.m @@ -130,6 +130,16 @@ - (void)batchedArray:(FUIBatchedArray *)array withRowAnimation:self.animation]; [self.tableView endUpdates]; + + // Reload paths that have been moved. + NSMutableArray *movedIndexPaths = + [NSMutableArray arrayWithCapacity:diff.movedResultIndexes.count]; + for (NSNumber *movedResultIndex in diff.movedResultIndexes) { + NSIndexPath *moved = [NSIndexPath indexPathForItem:movedResultIndex.integerValue inSection:0]; + [movedIndexPaths addObject:moved]; + } + [self.tableView reloadRowsAtIndexPaths:movedIndexPaths + withRowAnimation:UITableViewRowAnimationAutomatic]; } - (void)batchedArray:(FUIBatchedArray *)array queryDidFailWithError:(NSError *)error {