mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Refactoring
This commit is contained in:
@@ -109,6 +109,7 @@ import TextSelectionNode
|
||||
import ChatMessagePollBubbleContentNode
|
||||
import ChatMessageItem
|
||||
import ChatMessageItemView
|
||||
import ChatMessageItemCommon
|
||||
|
||||
public enum ChatControllerPeekActions {
|
||||
case standard
|
||||
@@ -19523,31 +19524,6 @@ extension Peer {
|
||||
}
|
||||
}
|
||||
|
||||
func canAddMessageReactions(message: Message) -> Bool {
|
||||
if message.id.namespace != Namespaces.Message.Cloud {
|
||||
return false
|
||||
}
|
||||
if let peer = message.peers[message.id.peerId] {
|
||||
if let _ = peer as? TelegramSecretChat {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
for media in message.media {
|
||||
if let _ = media as? TelegramMediaAction {
|
||||
return false
|
||||
} else if let story = media as? TelegramMediaStory {
|
||||
if story.isMention {
|
||||
return false
|
||||
}
|
||||
} else if let _ = media as? TelegramMediaExpiredContent {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
enum AllowedReactions {
|
||||
case set(Set<MessageReaction.Reaction>)
|
||||
case all
|
||||
|
||||
Reference in New Issue
Block a user