File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Firestore/FirebaseFirestoreUI Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,16 @@ - (void)batchedArray:(FUIBatchedArray *)array
130
130
withRowAnimation: self .animation];
131
131
132
132
[self .tableView endUpdates ];
133
+
134
+ // Reload paths that have been moved.
135
+ NSMutableArray *movedIndexPaths =
136
+ [NSMutableArray arrayWithCapacity: diff.movedResultIndexes.count];
137
+ for (NSNumber *movedResultIndex in diff.movedResultIndexes ) {
138
+ NSIndexPath *moved = [NSIndexPath indexPathForItem: movedResultIndex.integerValue inSection: 0 ];
139
+ [movedIndexPaths addObject: moved];
140
+ }
141
+ [self .tableView reloadRowsAtIndexPaths: movedIndexPaths
142
+ withRowAnimation: UITableViewRowAnimationAutomatic];
133
143
}
134
144
135
145
- (void )batchedArray : (FUIBatchedArray *)array queryDidFailWithError : (NSError *)error {
You can’t perform that action at this time.
0 commit comments