mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Comments [WIP]
This commit is contained in:
parent
6a0d0c1481
commit
933e1f788f
@ -5806,3 +5806,7 @@ Any member of this group will be able to see messages in the channel.";
|
|||||||
"Conversation.ContextMenuBlock" = "Block User";
|
"Conversation.ContextMenuBlock" = "Block User";
|
||||||
|
|
||||||
"Replies.BlockAndDeleteRepliesActionTitle" = "Block and Delete Replies";
|
"Replies.BlockAndDeleteRepliesActionTitle" = "Block and Delete Replies";
|
||||||
|
|
||||||
|
"Channel.CommentsGroup.Header" = "Select a group chat that will be used to host comments from your channel.";
|
||||||
|
"Channel.CommentsGroup.HeaderSet" = "%@ is selected as the group that will be used to host comments for your channel.";
|
||||||
|
"Channel.CommentsGroup.HeaderGroupSet" = "%@ is linking the group as it's discussion board.";
|
||||||
|
@ -136,12 +136,12 @@ private enum ChannelDiscussionGroupSetupControllerEntry: ItemListNodeEntry {
|
|||||||
let text: String
|
let text: String
|
||||||
if let title = title {
|
if let title = title {
|
||||||
if isGroup {
|
if isGroup {
|
||||||
text = presentationData.strings.Channel_DiscussionGroup_HeaderGroupSet(title).0
|
text = presentationData.strings.Channel_CommentsGroup_HeaderGroupSet(title).0
|
||||||
} else {
|
} else {
|
||||||
text = presentationData.strings.Channel_DiscussionGroup_HeaderSet(title).0
|
text = presentationData.strings.Channel_CommentsGroup_HeaderSet(title).0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
text = ""
|
text = presentationData.strings.Channel_CommentsGroup_Header
|
||||||
}
|
}
|
||||||
return ChatListFilterSettingsHeaderItem(theme: presentationData.theme, text: text, animation: .discussionGroupSetup, sectionId: self.section)
|
return ChatListFilterSettingsHeaderItem(theme: presentationData.theme, text: text, animation: .discussionGroupSetup, sectionId: self.section)
|
||||||
case let .create(theme, text):
|
case let .create(theme, text):
|
||||||
|
@ -132,9 +132,9 @@ class ChannelDiscussionGroupSetupHeaderItemNode: ListViewItemNode {
|
|||||||
let bold = MarkdownAttributeSet(font: titleBoldFont, textColor: item.theme.list.sectionHeaderTextColor)
|
let bold = MarkdownAttributeSet(font: titleBoldFont, textColor: item.theme.list.sectionHeaderTextColor)
|
||||||
let string: NSAttributedString
|
let string: NSAttributedString
|
||||||
if let title = item.title {
|
if let title = item.title {
|
||||||
string = addAttributesToStringWithRanges(item.isGroup ? item.strings.Channel_DiscussionGroup_HeaderGroupSet(title) : item.strings.Channel_DiscussionGroup_HeaderSet(title), body: body, argumentAttributes: [0: bold])
|
string = addAttributesToStringWithRanges(item.isGroup ? item.strings.Channel_CommentsGroup_HeaderGroupSet(title) : item.strings.Channel_CommentsGroup_HeaderSet(title), body: body, argumentAttributes: [0: bold])
|
||||||
} else {
|
} else {
|
||||||
string = NSAttributedString(string: item.strings.Channel_DiscussionGroup_Header, font: titleFont, textColor: item.theme.list.sectionHeaderTextColor)
|
string = NSAttributedString(string: item.strings.Channel_CommentsGroup_Header, font: titleFont, textColor: item.theme.list.sectionHeaderTextColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: string, backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
let (titleLayout, titleApply) = makeTitleLayout(TextNodeLayoutArguments(attributedString: string, backgroundColor: nil, maximumNumberOfLines: 0, truncationType: .end, constrainedSize: CGSize(width: params.width - params.leftInset - params.rightInset - 20.0, height: CGFloat.greatestFiniteMagnitude), alignment: .center, cutout: nil, insets: UIEdgeInsets()))
|
||||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -6089,6 +6089,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
if let currentButton = self.rightNavigationButton?.action, currentButton == button.action {
|
if let currentButton = self.rightNavigationButton?.action, currentButton == button.action {
|
||||||
animated = false
|
animated = false
|
||||||
}
|
}
|
||||||
|
if case .replyThread = self.chatLocation {
|
||||||
|
animated = false
|
||||||
|
}
|
||||||
self.navigationItem.setRightBarButton(button.buttonItem, animated: animated)
|
self.navigationItem.setRightBarButton(button.buttonItem, animated: animated)
|
||||||
self.rightNavigationButton = button
|
self.rightNavigationButton = button
|
||||||
}
|
}
|
||||||
|
@ -1366,7 +1366,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePrevewItemNode
|
|||||||
string = rank.trimmingEmojis
|
string = rank.trimmingEmojis
|
||||||
}
|
}
|
||||||
adminBadgeString = NSAttributedString(string: " \(string)", font: inlineBotPrefixFont, textColor: messageTheme.secondaryTextColor)
|
adminBadgeString = NSAttributedString(string: " \(string)", font: inlineBotPrefixFont, textColor: messageTheme.secondaryTextColor)
|
||||||
} else if authorIsChannel {
|
} else if authorIsChannel, case .peer = item.chatLocation {
|
||||||
adminBadgeString = NSAttributedString(string: " \(item.presentationData.strings.Channel_Status)", font: inlineBotPrefixFont, textColor: messageTheme.secondaryTextColor)
|
adminBadgeString = NSAttributedString(string: " \(item.presentationData.strings.Channel_Status)", font: inlineBotPrefixFont, textColor: messageTheme.secondaryTextColor)
|
||||||
}
|
}
|
||||||
if let authorNameString = authorNameString, let authorNameColor = authorNameColor, let inlineBotNameString = inlineBotNameString {
|
if let authorNameString = authorNameString, let authorNameColor = authorNameColor, let inlineBotNameString = inlineBotNameString {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user