This commit is contained in:
Ali
2020-11-06 02:58:28 +04:00
parent 8ddb4088d8
commit 518480564c
4 changed files with 20 additions and 10 deletions

View File

@@ -22,9 +22,17 @@ private func getAdjacentEntryGroupInfo(_ entry: IntermediateMessageHistoryEntry?
if let entry = entry {
if let groupingKey = entry.message.groupingKey {
if groupingKey == key {
return (entry, .sameGroup(entry.message.groupInfo!))
if let groupInfo = entry.message.groupInfo {
return (entry, .sameGroup(groupInfo))
} else {
return (entry, .none)
}
} else {
return (entry, .otherGroup(entry.message.groupInfo!))
if let groupInfo = entry.message.groupInfo {
return (entry, .otherGroup(groupInfo))
} else {
return (entry, .none)
}
}
} else {
return (entry, .none)