Fix assert for empty thread

// FREEBIE
This commit is contained in:
Michael Kirk 2017-09-28 09:31:17 -04:00
parent 5faeed4d59
commit e77a7e09bb
1 changed files with 4 additions and 0 deletions

View File

@ -4075,6 +4075,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
uint64_t lastVisibleTimestamp = self.lastVisibleTimestamp;
if (lastVisibleTimestamp == 0) {
// No visible messages yet. New Thread.
return;
}
[OWSReadReceiptManager.sharedManager markAsReadLocallyBeforeTimestamp:lastVisibleTimestamp thread:self.thread];
}