mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
force tabbar when editing
This commit is contained in:
parent
fc087f7c57
commit
e0a8f9ad85
@ -3397,6 +3397,9 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
if let layout = self.validLayout {
|
if let layout = self.validLayout {
|
||||||
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut))
|
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut))
|
||||||
}
|
}
|
||||||
|
if SGSimpleSettings.shared.hideTabBar {
|
||||||
|
(self.parent as? TabBarController)?.updateIsTabBarHidden(false, transition: .animated(duration: 0.2, curve: .easeInOut))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc fileprivate func donePressed() {
|
@objc fileprivate func donePressed() {
|
||||||
@ -3423,6 +3426,9 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut))
|
self.updateLayout(layout: layout, transition: .animated(duration: 0.2, curve: .easeInOut))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if SGSimpleSettings.shared.hideTabBar {
|
||||||
|
(self.parent as? TabBarController)?.updateIsTabBarHidden(true, transition: .animated(duration: 0.2, curve: .easeInOut))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var skipTabContainerUpdate = false
|
private var skipTabContainerUpdate = false
|
||||||
@ -4615,7 +4621,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
|
|
||||||
completion?()
|
completion?()
|
||||||
|
|
||||||
(self.parent as? TabBarController)?.updateIsTabBarHidden(false, transition: .animated(duration: 0.4, curve: .spring))
|
(self.parent as? TabBarController)?.updateIsTabBarHidden(SGSimpleSettings.shared.hideTabBar ? true : false, transition: .animated(duration: 0.4, curve: .spring))
|
||||||
|
|
||||||
self.isSearchActive = false
|
self.isSearchActive = false
|
||||||
if let navigationController = self.navigationController as? NavigationController {
|
if let navigationController = self.navigationController as? NavigationController {
|
||||||
@ -6598,7 +6604,9 @@ private final class ChatListLocationContext {
|
|||||||
}
|
}
|
||||||
var transition: ContainedViewLayoutTransition = .immediate
|
var transition: ContainedViewLayoutTransition = .immediate
|
||||||
let previousToolbar = previousToolbarValue.swap(toolbar)
|
let previousToolbar = previousToolbarValue.swap(toolbar)
|
||||||
if (previousToolbar == nil) != (toolbar == nil) {
|
if SGSimpleSettings.shared.hideTabBar {
|
||||||
|
transition = .animated(duration: 0.2, curve: .easeInOut)
|
||||||
|
} else if (previousToolbar == nil) != (toolbar == nil) {
|
||||||
transition = .animated(duration: 0.4, curve: .spring)
|
transition = .animated(duration: 0.4, curve: .spring)
|
||||||
}
|
}
|
||||||
if strongSelf.toolbar != toolbar {
|
if strongSelf.toolbar != toolbar {
|
||||||
|
@ -33,6 +33,7 @@ final class TabBarControllerNode: ASDisplayNode {
|
|||||||
self.theme = theme
|
self.theme = theme
|
||||||
self.navigationBarPresentationData = navigationBarPresentationData
|
self.navigationBarPresentationData = navigationBarPresentationData
|
||||||
self.tabBarNode = TabBarNode(showTabNames: showTabNames, theme: theme, itemSelected: itemSelected, contextAction: contextAction, swipeAction: swipeAction)
|
self.tabBarNode = TabBarNode(showTabNames: showTabNames, theme: theme, itemSelected: itemSelected, contextAction: contextAction, swipeAction: swipeAction)
|
||||||
|
self.tabBarNode.isHidden = SGSimpleSettings.shared.hideTabBar
|
||||||
self.disabledOverlayNode = ASDisplayNode()
|
self.disabledOverlayNode = ASDisplayNode()
|
||||||
self.disabledOverlayNode.backgroundColor = theme.backgroundColor.withAlphaComponent(0.5)
|
self.disabledOverlayNode.backgroundColor = theme.backgroundColor.withAlphaComponent(0.5)
|
||||||
self.disabledOverlayNode.alpha = 0.0
|
self.disabledOverlayNode.alpha = 0.0
|
||||||
|
@ -214,7 +214,8 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func updateIsTabBarHidden(_ value: Bool, transition: ContainedViewLayoutTransition) {
|
public func updateIsTabBarHidden(_ value: Bool, transition: ContainedViewLayoutTransition) {
|
||||||
self.tabBarControllerNode.tabBarHidden = SGSimpleSettings.shared.hideTabBar ? true : value
|
self.tabBarControllerNode.tabBarNode.isHidden = value
|
||||||
|
self.tabBarControllerNode.tabBarHidden = value
|
||||||
if let layout = self.validLayout {
|
if let layout = self.validLayout {
|
||||||
self.containerLayoutUpdated(layout, transition: .animated(duration: 0.4, curve: .slide))
|
self.containerLayoutUpdated(layout, transition: .animated(duration: 0.4, curve: .slide))
|
||||||
}
|
}
|
||||||
|
@ -4414,7 +4414,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
|
|||||||
UIView.transition(with: strongSelf.view, duration: 0.3, options: [.transitionCrossDissolve], animations: {
|
UIView.transition(with: strongSelf.view, duration: 0.3, options: [.transitionCrossDissolve], animations: {
|
||||||
}, completion: nil)
|
}, completion: nil)
|
||||||
}
|
}
|
||||||
(strongSelf.controller?.parent as? TabBarController)?.updateIsTabBarHidden(false, transition: .animated(duration: 0.3, curve: .linear))
|
(strongSelf.controller?.parent as? TabBarController)?.updateIsTabBarHidden(SGSimpleSettings.shared.hideTabBar ? true : false, transition: .animated(duration: 0.3, curve: .linear))
|
||||||
case .select:
|
case .select:
|
||||||
strongSelf.state = strongSelf.state.withSelectedMessageIds(Set())
|
strongSelf.state = strongSelf.state.withSelectedMessageIds(Set())
|
||||||
if let (layout, navigationHeight) = strongSelf.validLayout {
|
if let (layout, navigationHeight) = strongSelf.validLayout {
|
||||||
@ -11128,7 +11128,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
|
|||||||
searchDisplayController.deactivate(placeholder: nil)
|
searchDisplayController.deactivate(placeholder: nil)
|
||||||
|
|
||||||
if self.isSettings {
|
if self.isSettings {
|
||||||
(self.controller?.parent as? TabBarController)?.updateIsTabBarHidden(false, transition: .animated(duration: 0.3, curve: .linear))
|
(self.controller?.parent as? TabBarController)?.updateIsTabBarHidden(SGSimpleSettings.shared.hideTabBar ? true : false, transition: .animated(duration: 0.3, curve: .linear))
|
||||||
}
|
}
|
||||||
|
|
||||||
let transition: ContainedViewLayoutTransition = .animated(duration: 0.35, curve: .easeInOut)
|
let transition: ContainedViewLayoutTransition = .animated(duration: 0.35, curve: .easeInOut)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user