mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix missing comments button on video messages
This commit is contained in:
parent
ac0c4157aa
commit
e8e3ca56ed
@ -1734,6 +1734,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
}
|
||||
|
||||
var needsShareButton = false
|
||||
var mayHaveSeparateCommentsButton = false // MARK: Swiftgram
|
||||
|
||||
if incoming, case let .customChatContents(contents) = item.associatedData.subject, case .hashTagSearch = contents.kind {
|
||||
needsShareButton = true
|
||||
@ -1786,7 +1787,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
needsShareButton = true
|
||||
}
|
||||
}
|
||||
var mayHaveSeparateCommentsButton = false
|
||||
// var mayHaveSeparateCommentsButton = false // MARK: Swiftgram
|
||||
if !needsShareButton {
|
||||
loop: for media in item.message.media {
|
||||
if media is TelegramMediaGame || media is TelegramMediaInvoice {
|
||||
@ -1857,7 +1858,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
tmpWidth -= deliveryFailedInset
|
||||
// MARK: Swifgram
|
||||
let renderWideChannelPosts: Bool
|
||||
if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info, SGSimpleSettings.shared.wideChannelPosts, !hasSeparateCommentsButton {
|
||||
if let channel = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = channel.info, SGSimpleSettings.shared.wideChannelPosts, !(mayHaveSeparateCommentsButton && hasCommentButton(item: item)) {
|
||||
renderWideChannelPosts = true
|
||||
|
||||
tmpWidth = baseWidth
|
||||
|
Loading…
x
Reference in New Issue
Block a user