mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various improvements
This commit is contained in:
@@ -294,6 +294,9 @@ func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceS
|
||||
if case .member = channel.participationStatus {
|
||||
canReply = channel.hasPermission(.sendSomething)
|
||||
}
|
||||
if case .broadcast = channel.info {
|
||||
canReply = true
|
||||
}
|
||||
} else if let group = peer as? TelegramGroup {
|
||||
if case .Member = group.membership {
|
||||
canReply = true
|
||||
@@ -958,9 +961,11 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
|
||||
if !isPinnedMessages, !isReplyThreadHead, data.canReply {
|
||||
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.Conversation_ContextMenuReply, icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Reply"), color: theme.actionSheet.primaryTextColor)
|
||||
}, action: { _, f in
|
||||
interfaceInteraction.setupReplyMessage(messages[0].id, { transition in
|
||||
f(.custom(transition))
|
||||
}, action: { c, _ in
|
||||
interfaceInteraction.setupReplyMessage(messages[0].id, { transition, completed in
|
||||
c.dismiss(result: .custom(transition), completion: {
|
||||
completed()
|
||||
})
|
||||
})
|
||||
})))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user