This commit is contained in:
Ali
2023-06-20 20:03:16 +03:00
parent cf2b1f0de5
commit 6aa3e47ee8
13 changed files with 180 additions and 107 deletions

View File

@@ -98,6 +98,7 @@ import StoryContainerScreen
import StoryContentComponent
import MoreHeaderButton
import VolumeButtons
import ChatAvatarNavigationNode
#if DEBUG
import os.signpost
@@ -561,6 +562,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
private var powerSavingMonitoringDisposable: Disposable?
private var avatarNode: ChatAvatarNavigationNode?
public init(context: AccountContext, chatLocation: ChatLocation, chatLocationContextHolder: Atomic<ChatLocationContextHolder?> = Atomic<ChatLocationContextHolder?>(value: nil), subject: ChatControllerSubject? = nil, botStart: ChatControllerInitialBotStart? = nil, attachBotStart: ChatControllerInitialAttachBotStart? = nil, botAppStart: ChatControllerInitialBotAppStart? = nil, mode: ChatControllerPresentationMode = .standard(previewing: false), peekData: ChatPeekTimeout? = nil, peerNearbyData: ChatPeerNearbyData? = nil, chatListFilter: Int32? = nil, chatNavigationStack: [ChatNavigationStackItem] = []) {
let _ = ChatControllerCount.modify { value in
return value + 1
@@ -4687,7 +4690,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
strongSelf.presentInGlobalOverlay(contextController)
}
chatInfoButtonItem = UIBarButtonItem(customDisplayNode: avatarNode)!
self.avatarNode = avatarNode
avatarNode.updateStoryView(transition: .immediate, theme: self.presentationData.theme)
case .feed:
chatInfoButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
}