Various improvements

This commit is contained in:
Ilya Laktyushin
2025-02-25 19:59:48 +04:00
parent 4aeab37c70
commit cb0b8c0b9e
63 changed files with 2420 additions and 560 deletions

View File

@@ -379,7 +379,7 @@ extension ChatControllerImpl {
strongSelf.present(actionSheet, in: .window(.root))
})
}
case let .openChatInfo(expandAvatar, recommendedChannels):
case let .openChatInfo(expandAvatar, section):
let _ = self.presentVoiceMessageDiscardAlert(action: {
switch self.chatLocationInfoData {
case let .peer(peerView):
@@ -400,7 +400,16 @@ extension ChatControllerImpl {
if let validLayout = strongSelf.validLayout, validLayout.deviceMetrics.type == .tablet {
expandAvatar = false
}
if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, peer: peer, mode: recommendedChannels ? .recommendedChannels : .generic, avatarInitiallyExpanded: expandAvatar, fromChat: true, requestsContext: strongSelf.inviteRequestsContext) {
let mode: PeerInfoControllerMode
switch section {
case .groupsInCommon:
mode = .groupsInCommon
case .recommendedChannels:
mode = .recommendedChannels
default:
mode = .generic
}
if let infoController = strongSelf.context.sharedContext.makePeerInfoController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, peer: peer, mode: mode, avatarInitiallyExpanded: expandAvatar, fromChat: true, requestsContext: strongSelf.inviteRequestsContext) {
strongSelf.effectiveNavigationController?.pushViewController(infoController)
}
}