mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
1793490519
commit
73d25e7be3
25 changed files with 421 additions and 126 deletions
|
|
@ -1591,3 +1591,22 @@ public func canSendMessagesToChat(_ state: ChatPresentationInterfaceState) -> Bo
|
|||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func canSendReactionsToChat(_ state: ChatPresentationInterfaceState) -> Bool {
|
||||
if let peer = state.renderedPeer?.peer {
|
||||
let canBypassRestrictions = canBypassRestrictions(chatPresentationInterfaceState: state)
|
||||
return canSendReactionsToPeer(EnginePeer(peer), ignoreDefault: canBypassRestrictions)
|
||||
} else if case .customChatContents = state.chatLocation {
|
||||
if case let .customChatContents(contents) = state.subject {
|
||||
if case .hashTagSearch = contents.kind {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue