mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-25 09:32:46 +00:00
Fix reactions
This commit is contained in:
parent
cd98c0b7cc
commit
c79bef2f11
@ -1372,7 +1372,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
|||||||
}).start()
|
}).start()
|
||||||
})
|
})
|
||||||
case let .devRequests(value):
|
case let .devRequests(value):
|
||||||
return ItemListSwitchItem(presentationData: presentationData, title: "PlayerV2", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
return ItemListSwitchItem(presentationData: presentationData, title: "DevRequests", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
||||||
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
||||||
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.experimentalUISettings, { settings in
|
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.experimentalUISettings, { settings in
|
||||||
var settings = settings?.get(ExperimentalUISettings.self) ?? ExperimentalUISettings.defaultSettings
|
var settings = settings?.get(ExperimentalUISettings.self) ?? ExperimentalUISettings.defaultSettings
|
||||||
|
|||||||
@ -187,7 +187,15 @@ func _internal_sendStarsReactionsInteractively(account: Account, messageId: Mess
|
|||||||
for attribute in attributes {
|
for attribute in attributes {
|
||||||
if let attribute = attribute as? ReactionsMessageAttribute {
|
if let attribute = attribute as? ReactionsMessageAttribute {
|
||||||
if let myReaction = attribute.topPeers.first(where: { $0.isMy }) {
|
if let myReaction = attribute.topPeers.first(where: { $0.isMy }) {
|
||||||
resolvedPrivacy = myReaction.isAnonymous ? .anonymous : .default
|
if myReaction.isAnonymous {
|
||||||
|
resolvedPrivacy = .anonymous
|
||||||
|
} else if myReaction.peerId == account.peerId {
|
||||||
|
resolvedPrivacy = .default
|
||||||
|
} else if let peerId = myReaction.peerId {
|
||||||
|
resolvedPrivacy = .peer(peerId)
|
||||||
|
} else {
|
||||||
|
resolvedPrivacy = .anonymous
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -599,6 +599,6 @@ public final class PendingStarsReactionsMessageAttribute: MessageAttribute {
|
|||||||
encoder.encodeNil(forKey: "ap")
|
encoder.encodeNil(forKey: "ap")
|
||||||
}
|
}
|
||||||
encoder.encodeInt32(self.count, forKey: "cnt")
|
encoder.encodeInt32(self.count, forKey: "cnt")
|
||||||
encoder.encodeCodable(self.privacy, forKey: "priv")
|
encoder.encode(self.privacy, forKey: "priv")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user