mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Monoforums
This commit is contained in:
@@ -434,14 +434,6 @@ func updateChatPresentationInterfaceStateImpl(
|
||||
|
||||
selfController.presentationInterfaceState = updatedChatPresentationInterfaceState
|
||||
|
||||
/*if selfController.chatDisplayNode.chatLocation != selfController.presentationInterfaceState.chatLocation {
|
||||
let defaultDirection: ChatControllerAnimateInnerChatSwitchDirection? = selfController.chatDisplayNode.chatLocationTabSwitchDirection(from: selfController.chatLocation.threadId, to: selfController.presentationInterfaceState.chatLocation.threadId).flatMap { direction -> ChatControllerAnimateInnerChatSwitchDirection in
|
||||
return direction ? .right : .left
|
||||
}
|
||||
let tabSwitchDirection = selfController.currentChatSwitchDirection ?? defaultDirection
|
||||
selfController.chatDisplayNode.updateChatLocation(chatLocation: selfController.presentationInterfaceState.chatLocation, transition: transition, tabSwitchDirection: tabSwitchDirection)
|
||||
}*/
|
||||
|
||||
selfController.updateSlowmodeStatus()
|
||||
|
||||
switch updatedChatPresentationInterfaceState.inputMode {
|
||||
@@ -498,20 +490,11 @@ func updateChatPresentationInterfaceStateImpl(
|
||||
}
|
||||
|
||||
var buttonsAnimated = transition.isAnimated
|
||||
if selfController.currentChatSwitchDirection != nil {
|
||||
buttonsAnimated = false
|
||||
}
|
||||
if let button = rightNavigationButtonForChatInterfaceState(context: selfController.context, presentationInterfaceState: updatedChatPresentationInterfaceState, strings: updatedChatPresentationInterfaceState.strings, currentButton: selfController.rightNavigationButton, target: selfController, selector: #selector(selfController.rightNavigationButtonAction), chatInfoNavigationButton: selfController.chatInfoNavigationButton, moreInfoNavigationButton: selfController.moreInfoNavigationButton) {
|
||||
if selfController.rightNavigationButton != button {
|
||||
if let currentButton = selfController.rightNavigationButton?.action, currentButton == button.action {
|
||||
buttonsAnimated = false
|
||||
}
|
||||
if case .replyThread = selfController.chatLocation {
|
||||
buttonsAnimated = false
|
||||
}
|
||||
if let channel = updatedChatPresentationInterfaceState.renderedPeer?.peer as? TelegramChannel, channel.isMonoForum {
|
||||
buttonsAnimated = false
|
||||
}
|
||||
selfController.rightNavigationButton = button
|
||||
}
|
||||
} else if let _ = selfController.rightNavigationButton {
|
||||
|
||||
Reference in New Issue
Block a user