Backport the groupInfo attempted fix

This commit is contained in:
Ali 2020-11-11 18:55:12 +04:00
parent 3eedd075a9
commit 9cf0acaf38

View File

@ -20,11 +20,11 @@ private enum AdjacentEntryGroupInfo {
private func getAdjacentEntryGroupInfo(_ entry: IntermediateMessageHistoryEntry?, key: Int64) -> (IntermediateMessageHistoryEntry?, AdjacentEntryGroupInfo) {
if let entry = entry {
if let groupingKey = entry.message.groupingKey {
if let groupingKey = entry.message.groupingKey, let groupInfo = entry.message.groupInfo {
if groupingKey == key {
return (entry, .sameGroup(entry.message.groupInfo!))
return (entry, .sameGroup(groupInfo))
} else {
return (entry, .otherGroup(entry.message.groupInfo!))
return (entry, .otherGroup(groupInfo))
}
} else {
return (entry, .none)