mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
1227731b4f
@ -1297,16 +1297,21 @@ public final class AccountViewTracker {
|
|||||||
let _ = (account.postbox.transaction { transaction -> Void in
|
let _ = (account.postbox.transaction { transaction -> Void in
|
||||||
for id in addedMessageIds {
|
for id in addedMessageIds {
|
||||||
if let _ = transaction.getMessage(id) {
|
if let _ = transaction.getMessage(id) {
|
||||||
/*transaction.updateMessage(id, update: { currentMessage in
|
transaction.updateMessage(id, update: { currentMessage in
|
||||||
|
if !currentMessage.tags.contains(.unseenReaction) {
|
||||||
|
return .skip
|
||||||
|
}
|
||||||
var attributes = currentMessage.attributes
|
var attributes = currentMessage.attributes
|
||||||
loop: for j in 0 ..< attributes.count {
|
loop: for j in 0 ..< attributes.count {
|
||||||
if let attribute = attributes[j] as? ConsumablePersonalMentionMessageAttribute {
|
if let attribute = attributes[j] as? ReactionsMessageAttribute {
|
||||||
attributes[j] = ConsumablePersonalMentionMessageAttribute(consumed: attribute.consumed, pending: true)
|
attributes[j] = attribute.withAllSeen()
|
||||||
break loop
|
break loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return .update(StoreMessage(id: currentMessage.id, globallyUniqueId: currentMessage.globallyUniqueId, groupingKey: currentMessage.groupingKey, threadId: currentMessage.threadId, timestamp: currentMessage.timestamp, flags: StoreMessageFlags(currentMessage.flags), tags: currentMessage.tags, globalTags: currentMessage.globalTags, localTags: currentMessage.localTags, forwardInfo: currentMessage.forwardInfo.flatMap(StoreMessageForwardInfo.init), authorId: currentMessage.author?.id, text: currentMessage.text, attributes: attributes, media: currentMessage.media))
|
var tags = currentMessage.tags
|
||||||
})*/
|
tags.remove(.unseenReaction)
|
||||||
|
return .update(StoreMessage(id: currentMessage.id, globallyUniqueId: currentMessage.globallyUniqueId, groupingKey: currentMessage.groupingKey, threadId: currentMessage.threadId, timestamp: currentMessage.timestamp, flags: StoreMessageFlags(currentMessage.flags), tags: tags, globalTags: currentMessage.globalTags, localTags: currentMessage.localTags, forwardInfo: currentMessage.forwardInfo.flatMap(StoreMessageForwardInfo.init), authorId: currentMessage.author?.id, text: currentMessage.text, attributes: attributes, media: currentMessage.media))
|
||||||
|
})
|
||||||
|
|
||||||
if transaction.getPendingMessageAction(type: .readReaction, id: id) == nil {
|
if transaction.getPendingMessageAction(type: .readReaction, id: id) == nil {
|
||||||
transaction.setPendingMessageAction(type: .readReaction, id: id, action: ReadReactionAction())
|
transaction.setPendingMessageAction(type: .readReaction, id: id, action: ReadReactionAction())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user