mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-08-10 08:10:32 +02:00
chore: migrate to new version + fixed several critical bugs
- Migrated project to latest Telegram iOS base (v12.3.2+) - Fixed circular dependency between GhostModeManager and MiscSettingsManager - Fixed multiple Bazel build configuration errors (select() default conditions) - Fixed duplicate type definitions in PeerInfoScreen - Fixed swiftmodule directory resolution in build scripts - Added Ghostgram Settings tab in main Settings menu with all 5 features - Cleared sensitive credentials from config.json (template-only now) - Excluded bazel-cache from version control
This commit is contained in:
@@ -93,9 +93,11 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
private let pendingControllerDisposable = MetaDisposable()
|
||||
|
||||
private var theme: PresentationTheme
|
||||
private var strings: PresentationStrings
|
||||
|
||||
public init(theme: PresentationTheme) {
|
||||
public init(theme: PresentationTheme, strings: PresentationStrings) {
|
||||
self.theme = theme
|
||||
self.strings = strings
|
||||
|
||||
super.init(navigationBarPresentationData: nil)
|
||||
|
||||
@@ -152,7 +154,7 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
}
|
||||
|
||||
override open func loadDisplayNode() {
|
||||
self.displayNode = TabBarControllerNode(theme: self.theme, itemSelected: { [weak self] index, longTap, itemNodes in
|
||||
self.displayNode = TabBarControllerNode(theme: self.theme, strings: self.strings, itemSelected: { [weak self] index, longTap, itemNodes in
|
||||
if let strongSelf = self {
|
||||
if longTap, let controller = strongSelf.controllers[index] as? TabBarContainedController {
|
||||
controller.presentTabBarPreviewingController(sourceNodes: itemNodes)
|
||||
@@ -235,6 +237,16 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
self?.currentController?.toolbarActionSelected(action: action)
|
||||
}, disabledPressed: { [weak self] in
|
||||
self?.currentController?.tabBarDisabledAction()
|
||||
}, activateSearch: { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.currentController?.tabBarActivateSearch()
|
||||
}, deactivateSearch: { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.currentController?.tabBarDeactivateSearch()
|
||||
})
|
||||
|
||||
self.updateSelectedIndex()
|
||||
@@ -263,7 +275,8 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
}
|
||||
if let currentController = self.currentController {
|
||||
currentController.willMove(toParent: nil)
|
||||
//self.tabBarControllerNode.currentControllerNode = nil
|
||||
currentController.tabBarSearchStateUpdated = nil
|
||||
currentController.currentTabBarSearchNode = nil
|
||||
|
||||
if animated {
|
||||
currentController.view.layer.animateScale(from: 1.0, to: transitionScale, duration: 0.12, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false, completion: { completed in
|
||||
@@ -286,7 +299,7 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
currentController.willMove(toParent: self)
|
||||
self.addChild(currentController)
|
||||
|
||||
let commit = self.tabBarControllerNode.setCurrentControllerNode(currentController.displayNode)
|
||||
let commit = self.tabBarControllerNode.setCurrentController(currentController)
|
||||
if animated {
|
||||
currentController.view.layer.animateScale(from: transitionScale, to: 1.0, duration: 0.15, delay: 0.1, timingFunction: kCAMediaTimingFunctionSpring)
|
||||
currentController.view.layer.allowsGroupOpacity = true
|
||||
@@ -303,6 +316,22 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
||||
|
||||
currentController.displayNode.recursivelyEnsureDisplaySynchronously(true)
|
||||
self.statusBar.statusBarStyle = currentController.statusBar.statusBarStyle
|
||||
|
||||
currentController.tabBarSearchStateUpdated = { [weak self] transition in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
if let layout = self.validLayout {
|
||||
self.containerLayoutUpdated(layout, transition: transition)
|
||||
}
|
||||
}
|
||||
|
||||
currentController.currentTabBarSearchNode = { [weak self] in
|
||||
guard let self else {
|
||||
return nil
|
||||
}
|
||||
return self.tabBarControllerNode.currentSearchNode
|
||||
}
|
||||
}
|
||||
|
||||
if let layout = self.validLayout {
|
||||
|
||||
Reference in New Issue
Block a user