Merge commit 'b909d1bea021e1c9c86626981a189d715dfffad5'

This commit is contained in:
Ilya Laktyushin
2024-02-06 17:33:38 +04:00
198 changed files with 11651 additions and 3398 deletions

View File

@@ -2410,7 +2410,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
}
if hasEmptyMark {
if let componentView = self.chatListHeaderView() {
if let rightButtonView = componentView.rightButtonView {
if let rightButtonView = componentView.rightButtonViews["compose"] {
let absoluteFrame = rightButtonView.convert(rightButtonView.bounds, to: self.view)
let text: String = self.presentationData.strings.ChatList_EmptyListTooltip
@@ -2903,8 +2903,15 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
self.push(PeerInfoStoryGridScreen(context: self.context, peerId: self.context.account.peerId, scope: .archive))
})
})))
} else if case .channel = peer {
items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.ChatList_ContextOpenChannel, icon: { theme in
} else if case let .channel(channel) = peer {
let openTitle: String
switch channel.info {
case .broadcast:
openTitle = self.presentationData.strings.ChatList_ContextOpenChannel
case .group:
openTitle = self.presentationData.strings.ChatList_ContextOpenGroup
}
items.append(.action(ContextMenuActionItem(text: openTitle, icon: { theme in
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Channels"), color: theme.contextMenu.primaryColor)
}, action: { [weak self] c, _ in
c.dismiss(completion: {