Avoid overflow.

This commit is contained in:
Matthew Chen 2019-01-07 09:56:53 -05:00
parent f32edc93e4
commit 73f5d9237d
1 changed files with 1 additions and 1 deletions

View File

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