mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
4cca16b10d
@ -3002,16 +3002,21 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
}
|
||||
}
|
||||
case let .MessageGroupEntry(_, messages, _):
|
||||
for message in messages {
|
||||
if !existingStableIds.contains(message.0.stableId) {
|
||||
if let autoremoveAttribute = message.0.autoremoveAttribute, let countdownBeginTime = autoremoveAttribute.countdownBeginTime {
|
||||
let exipiresAt = countdownBeginTime + autoremoveAttribute.timeout
|
||||
if exipiresAt >= currentTimestamp - 1 {
|
||||
expiredMessageStableIds.insert(message.0.stableId)
|
||||
} else {
|
||||
expiredMessageStableIds.insert(message.0.stableId)
|
||||
}
|
||||
var isRemoved = true
|
||||
inner: for message in messages {
|
||||
if existingStableIds.contains(message.0.stableId) {
|
||||
isRemoved = false
|
||||
break inner
|
||||
}
|
||||
}
|
||||
if isRemoved, let message = messages.first?.0 {
|
||||
if let autoremoveAttribute = message.autoremoveAttribute, let countdownBeginTime = autoremoveAttribute.countdownBeginTime {
|
||||
let exipiresAt = countdownBeginTime + autoremoveAttribute.timeout
|
||||
if exipiresAt >= currentTimestamp - 1 {
|
||||
expiredMessageStableIds.insert(message.stableId)
|
||||
}
|
||||
} else {
|
||||
expiredMessageStableIds.insert(message.stableId)
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user