mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Force remove timestamp based attributes
This commit is contained in:
parent
70b479b304
commit
39580a0d2e
@ -82,8 +82,9 @@ final class TimestampBasedMessageAttributesTable: Table {
|
||||
if let previousTimestamp = previousTimestamp {
|
||||
self.valueBox.remove(self.table, key: self.key(tag: tag, timestamp: previousTimestamp, id: id), secure: false)
|
||||
self.indexTable.remove(tag: tag, id: id)
|
||||
operations.append(.remove(TimestampBasedMessageAttributesEntry(tag: tag, timestamp: previousTimestamp, messageId: id)))
|
||||
}
|
||||
|
||||
operations.append(.remove(TimestampBasedMessageAttributesEntry(tag: tag, timestamp: previousTimestamp ?? 0, messageId: id)))
|
||||
}
|
||||
|
||||
func head(tag: UInt16) -> TimestampBasedMessageAttributesEntry? {
|
||||
|
@ -30,7 +30,7 @@ final class MutableTimestampBasedMessageAttributesView {
|
||||
}
|
||||
case let .remove(entry):
|
||||
if entry.tag == self.tag {
|
||||
if let head = self.head, head.index == entry.index {
|
||||
if let head = self.head, head.messageId == entry.messageId {
|
||||
self.head = nil
|
||||
updated = true
|
||||
invalidatedHead = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user