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:
@@ -249,7 +249,7 @@ private func canViewReadStats(message: Message, participantCount: Int?, isMessag
|
||||
return true
|
||||
}
|
||||
|
||||
func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceState) -> Bool {
|
||||
func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceState, accountPeerId: PeerId) -> Bool {
|
||||
guard let peer = chatPresentationInterfaceState.renderedPeer?.peer else {
|
||||
return false
|
||||
}
|
||||
@@ -272,6 +272,9 @@ func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceS
|
||||
default:
|
||||
break
|
||||
}
|
||||
if case let .replyThread(replyThreadMessage) = chatPresentationInterfaceState.chatLocation, replyThreadMessage.peerId == accountPeerId {
|
||||
return false
|
||||
}
|
||||
|
||||
if let channel = peer as? TelegramChannel, channel.flags.contains(.isForum) {
|
||||
if let threadData = chatPresentationInterfaceState.threadData {
|
||||
@@ -611,7 +614,7 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
|
||||
}
|
||||
}
|
||||
|
||||
var canReply = canReplyInChat(chatPresentationInterfaceState)
|
||||
var canReply = canReplyInChat(chatPresentationInterfaceState, accountPeerId: context.account.peerId)
|
||||
var canPin = false
|
||||
let canSelect = !isAction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user