mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Improve navigation stack
This commit is contained in:
parent
4afd49ee48
commit
7c78cb8230
@ -14875,7 +14875,9 @@ final class ChatControllerNavigationDataSummary: CustomViewControllerNavigationD
|
||||
|
||||
func adding(peerId: PeerId) -> ChatControllerNavigationDataSummary {
|
||||
var peerIds = self.peerIds
|
||||
peerIds.removeAll(where: { $0 == peerId })
|
||||
if let index = peerIds.firstIndex(of: peerId) {
|
||||
peerIds.removeSubrange(0 ... index)
|
||||
}
|
||||
peerIds.insert(peerId, at: 0)
|
||||
return ChatControllerNavigationDataSummary(peerIds: peerIds)
|
||||
}
|
||||
|
@ -7059,6 +7059,16 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen {
|
||||
return self._ready
|
||||
}
|
||||
|
||||
override public var customNavigationData: CustomViewControllerNavigationData? {
|
||||
get {
|
||||
if !self.isSettings {
|
||||
return ChatControllerNavigationData(peerId: self.peerId)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var validLayout: (layout: ContainerViewLayout, navigationHeight: CGFloat)?
|
||||
|
||||
public init(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)?, peerId: PeerId, avatarInitiallyExpanded: Bool, isOpenedFromChat: Bool, nearbyPeerDistance: Int32?, callMessages: [Message], isSettings: Bool = false, hintGroupInCommon: PeerId? = nil, requestsContext: PeerInvitationImportersContext? = nil) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user