Various fixes

This commit is contained in:
Ilya Laktyushin
2023-03-29 13:34:23 +04:00
parent 1b8b4562ba
commit 4cb9136b46
3 changed files with 23 additions and 47 deletions

View File

@@ -1366,33 +1366,5 @@ class ChatMessageDateAndStatusNode: ASDisplayNode {
}
func shouldDisplayInlineDateReactions(message: Message, isPremium: Bool, forceInline: Bool) -> Bool {
if forceInline {
return true
}
if message.id.peerId.namespace == Namespaces.Peer.CloudUser || message.id.peerId.namespace == Namespaces.Peer.SecretChat {
if let chatPeer = message.peers[message.id.peerId] as? TelegramUser, chatPeer.isPremium {
return false
}
if let author = message.author as? TelegramUser, author.isPremium {
return false
}
if isPremium {
return false
}
if let effectiveReactions = message.effectiveReactions {
if effectiveReactions.count > 1 {
return false
}
for reaction in effectiveReactions {
if case .custom = reaction.value {
return false
}
}
}
return true
}
return false
return forceInline
}