User Profile Improvements

This commit is contained in:
Ilya Laktyushin
2022-01-25 06:05:50 +03:00
parent 7e9fea5c48
commit 7ccd563199
21 changed files with 70 additions and 55 deletions

View File

@@ -1239,7 +1239,7 @@ public final class SharedAccountContextImpl: SharedAccountContext {
let controllerInteraction: ChatControllerInteraction
controllerInteraction = ChatControllerInteraction(openMessage: { _, _ in
return false }, openPeer: { _, _, _ in }, openPeerMention: { _ in }, openMessageContextMenu: { _, _, _, _, _ in }, openMessageReactionContextMenu: { _, _, _, _ in
return false }, openPeer: { _, _, _, _ in }, openPeerMention: { _ in }, openMessageContextMenu: { _, _, _, _, _ in }, openMessageReactionContextMenu: { _, _, _, _ in
}, updateMessageReaction: { _, _ in }, activateMessagePinch: { _ in
}, openMessageContextActions: { _, _, _, _ in }, navigateToMessage: { _, _ in }, navigateToMessageStandalone: { _ in
}, tapMessage: { message in
@@ -1437,7 +1437,7 @@ private func peerInfoControllerImpl(context: AccountContext, updatedPresentation
} else if peer is TelegramUser {
var nearbyPeerDistance: Int32?
var callMessages: [Message] = []
var ignoreGroupInCommon: PeerId?
var hintGroupInCommon: PeerId?
switch mode {
case let .nearbyPeer(distance):
nearbyPeerDistance = distance
@@ -1446,9 +1446,9 @@ private func peerInfoControllerImpl(context: AccountContext, updatedPresentation
case .generic:
break
case let .group(id):
ignoreGroupInCommon = id
hintGroupInCommon = id
}
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nearbyPeerDistance, callMessages: callMessages, ignoreGroupInCommon: ignoreGroupInCommon)
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nearbyPeerDistance, callMessages: callMessages, hintGroupInCommon: hintGroupInCommon)
} else if peer is TelegramSecretChat {
return PeerInfoScreenImpl(context: context, updatedPresentationData: updatedPresentationData, peerId: peer.id, avatarInitiallyExpanded: avatarInitiallyExpanded, isOpenedFromChat: isOpenedFromChat, nearbyPeerDistance: nil, callMessages: [])
}