probably fix a crash since the sort id might not be initialized

pull/247/head
Ryan ZHAO 5 years ago
parent 794ac0c954
commit 8b032a40e4

@ -456,7 +456,7 @@ typedef void (^BuildOutgoingMessageCompletionBlock)(TSOutgoingMessage *savedMess
} else {
TSInteraction *_Nullable firstUnseenInteraction =
[[TSDatabaseView unseenDatabaseViewExtension:transaction] firstObjectInGroup:thread.uniqueId];
if (firstUnseenInteraction) {
if (firstUnseenInteraction && firstUnseenInteraction.sortId != NULL) {
firstUnseenSortId = @(firstUnseenInteraction.sortId);
}
}

Loading…
Cancel
Save