Fix crash on displaying unknown contact header

Fixes #6924

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-09-06 15:49:10 -07:00
parent bdb67725c5
commit e172b84603
5 changed files with 20 additions and 11 deletions

View File

@@ -317,9 +317,9 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
if (lastSeen <= 0) return -1;
if (!isActiveCursor()) return -1;
int count = getItemCount() - (hasHeaderView() ? 1 : 0) - (hasFooterView() ? 1 : 0);
int count = getItemCount() - (hasFooterView() ? 1 : 0);
for (int i=0;i<count;i++) {
for (int i=(hasHeaderView() ? 1 : 0);i<count;i++) {
MessageRecord messageRecord = getRecordForPositionOrThrow(i);
if (messageRecord.isOutgoing() || messageRecord.getDateReceived() <= lastSeen) {