mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-07-09 17:38:35 +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:
+9
-9
@@ -44,13 +44,13 @@ public final class ChatTitleProxyNode: ASDisplayNode {
|
||||
if self.theme !== oldValue {
|
||||
switch self.status {
|
||||
case .connecting:
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: false, off: false)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: false, off: false)
|
||||
case .connected:
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: true, off: false)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: true, off: false)
|
||||
case .available:
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: false, off: true)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: false, off: true)
|
||||
}
|
||||
self.activityIndicator.type = .custom(theme.rootController.navigationBar.accentTextColor, 10.0, 1.3333, true)
|
||||
self.activityIndicator.type = .custom(theme.chat.inputPanel.panelControlColor, 10.0, 1.3333, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,13 +61,13 @@ public final class ChatTitleProxyNode: ASDisplayNode {
|
||||
switch self.status {
|
||||
case .connecting:
|
||||
self.activityIndicator.isHidden = false
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: false, off: false)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: false, off: false)
|
||||
case .connected:
|
||||
self.activityIndicator.isHidden = true
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: true, off: false)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: true, off: false)
|
||||
case .available:
|
||||
self.activityIndicator.isHidden = true
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: false, off: true)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: false, off: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,9 +80,9 @@ public final class ChatTitleProxyNode: ASDisplayNode {
|
||||
self.iconNode.isLayerBacked = true
|
||||
self.iconNode.displayWithoutProcessing = true
|
||||
self.iconNode.displaysAsynchronously = false
|
||||
self.iconNode.image = generateIcon(color: theme.rootController.navigationBar.accentTextColor, connected: false, off: true)
|
||||
self.iconNode.image = generateIcon(color: theme.chat.inputPanel.panelControlColor, connected: false, off: true)
|
||||
|
||||
self.activityIndicator = ActivityIndicator(type: .custom(theme.rootController.navigationBar.accentTextColor, 10.0, 1.3333, true), speed: .slow)
|
||||
self.activityIndicator = ActivityIndicator(type: .custom(theme.chat.inputPanel.panelControlColor, 10.0, 1.3333, true), speed: .slow)
|
||||
|
||||
super.init()
|
||||
|
||||
|
||||
@@ -60,9 +60,10 @@ public final class ChatListTitleView: UIView, NavigationBarTitleView, Navigation
|
||||
private let animationCache: AnimationCache
|
||||
private let animationRenderer: MultiAnimationRenderer
|
||||
|
||||
public var requestUpdate: ((ContainedViewLayoutTransition) -> Void)?
|
||||
public var openStatusSetup: ((UIView) -> Void)?
|
||||
|
||||
private var validLayout: (CGSize, CGRect)?
|
||||
private var validLayout: CGSize?
|
||||
|
||||
public var manualLayout: Bool = false
|
||||
|
||||
@@ -321,13 +322,18 @@ public final class ChatListTitleView: UIView, NavigationBarTitleView, Navigation
|
||||
override public func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
if !self.manualLayout, let (size, clearBounds) = self.validLayout {
|
||||
let _ = self.updateLayout(size: size, clearBounds: clearBounds, transition: .immediate)
|
||||
if !self.manualLayout, let size = self.validLayout {
|
||||
let _ = self.updateLayout(availableSize: size, transition: .immediate)
|
||||
}
|
||||
}
|
||||
|
||||
public func updateLayout(size: CGSize, clearBounds: CGRect, transition: ContainedViewLayoutTransition) -> CGRect {
|
||||
self.validLayout = (size, clearBounds)
|
||||
public func updateLayout(availableSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||
let _ = self.updateLayoutInternal(size: availableSize, transition: transition)
|
||||
return availableSize
|
||||
}
|
||||
|
||||
public func updateLayoutInternal(size: CGSize, transition: ContainedViewLayoutTransition) -> CGRect {
|
||||
self.validLayout = size
|
||||
|
||||
var indicatorPadding: CGFloat = 0.0
|
||||
let indicatorSize = self.activityIndicator.bounds.size
|
||||
@@ -335,7 +341,7 @@ public final class ChatListTitleView: UIView, NavigationBarTitleView, Navigation
|
||||
if !self.activityIndicator.isHidden {
|
||||
indicatorPadding = indicatorSize.width + 6.0
|
||||
}
|
||||
var maxTitleWidth = clearBounds.size.width - indicatorPadding
|
||||
var maxTitleWidth = size.width - indicatorPadding
|
||||
var proxyPadding: CGFloat = 0.0
|
||||
if !self.proxyNode.isHidden {
|
||||
maxTitleWidth -= 25.0
|
||||
@@ -353,7 +359,7 @@ public final class ChatListTitleView: UIView, NavigationBarTitleView, Navigation
|
||||
|
||||
var titleContentRect = CGRect(origin: CGPoint(x: indicatorPadding + floor((size.width - combinedWidth - indicatorPadding) / 2.0), y: floor((size.height - combinedHeight) / 2.0)), size: titleSize)
|
||||
|
||||
titleContentRect.origin.x = min(titleContentRect.origin.x, clearBounds.maxX - proxyPadding - titleContentRect.width)
|
||||
titleContentRect.origin.x = min(titleContentRect.origin.x, size.width - proxyPadding - titleContentRect.width)
|
||||
|
||||
let titleFrame = titleContentRect
|
||||
var titleTransition = transition
|
||||
@@ -362,7 +368,7 @@ public final class ChatListTitleView: UIView, NavigationBarTitleView, Navigation
|
||||
}
|
||||
titleTransition.updateFrame(node: self.titleNode, frame: titleFrame)
|
||||
|
||||
let proxyFrame = CGRect(origin: CGPoint(x: clearBounds.maxX - 9.0 - self.proxyNode.bounds.width, y: floor((size.height - self.proxyNode.bounds.height) / 2.0)), size: self.proxyNode.bounds.size)
|
||||
let proxyFrame = CGRect(origin: CGPoint(x: size.width - 9.0 - self.proxyNode.bounds.width, y: floor((size.height - self.proxyNode.bounds.height) / 2.0)), size: self.proxyNode.bounds.size)
|
||||
self.proxyNode.frame = proxyFrame
|
||||
|
||||
self.proxyButton.frame = proxyFrame.insetBy(dx: -2.0, dy: -2.0)
|
||||
|
||||
Reference in New Issue
Block a user