Avoid overflow.

pull/1/head
Matthew Chen 6 years ago
parent f32edc93e4
commit 73f5d9237d

@ -896,7 +896,7 @@ static const int kYapDatabaseRangeMaxLength = 25000;
// We skip animations for the last _two_ // We skip animations for the last _two_
// interactions, not one since there // interactions, not one since there
// may be a typing indicator. // may be a typing indicator.
if (updateItem.newIndex < updateItems.count - 2) { if (updateItem.newIndex + 2 < updateItems.count) {
isOnlyModifyingLastMessage = NO; isOnlyModifyingLastMessage = NO;
} }
break; break;

Loading…
Cancel
Save