This commit is contained in:
ryanzhao 2021-08-09 11:20:57 +10:00
parent ce8f4f984d
commit 025ef2c301
1 changed files with 2 additions and 2 deletions

View File

@ -835,8 +835,8 @@ NS_ASSUME_NONNULL_BEGIN
// to show the date header of the deleted message if needed // to show the date header of the deleted message if needed
for (NSString *deletedItemId in deletedItemIdSet) { for (NSString *deletedItemId in deletedItemIdSet) {
NSUInteger oldIndex = [oldItemIdList indexOfObject:deletedItemId]; NSUInteger oldIndex = [oldItemIdList indexOfObject:deletedItemId];
id<ConversationViewItem> _Nullable nextItemId = (oldIndex + 1 < oldItemIdList.count ? oldItemIdList[oldIndex + 1] : nil); if (oldIndex != NSNotFound && oldIndex + 1 < oldItemIdList.count) {
if (nextItemId != nil) { NSString *nextItemId = oldItemIdList[oldIndex + 1];
[updatedItemSet addObject:nextItemId]; [updatedItemSet addObject:nextItemId];
[updatedNeighborItemSet addObject:nextItemId]; [updatedNeighborItemSet addObject:nextItemId];
} }