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:
ichmagmaus 812
2026-02-23 23:04:32 +01:00
parent 703e291bcb
commit db53826061
1017 changed files with 62323 additions and 40545 deletions
@@ -28,23 +28,27 @@ import ButtonComponent
import UndoUI
import LottieComponent
import AnimatedTextComponent
import TableComponent
private final class GiftAuctionViewSheetContent: CombinedComponent {
typealias EnvironmentType = ViewControllerComponentContainer.Environment
let context: AccountContext
let auctionContext: GiftAuctionContext
let peerId: EnginePeer.Id?
let animateOut: ActionSlot<Action<()>>
let getController: () -> ViewController?
init(
context: AccountContext,
auctionContext: GiftAuctionContext,
peerId: EnginePeer.Id?,
animateOut: ActionSlot<Action<()>>,
getController: @escaping () -> ViewController?
) {
self.context = context
self.auctionContext = auctionContext
self.peerId = peerId
self.animateOut = animateOut
self.getController = getController
}
@@ -61,6 +65,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
private let context: AccountContext
private let auctionContext: GiftAuctionContext
private let peerId: EnginePeer.Id?
private let animateOut: ActionSlot<Action<()>>
private let getController: () -> ViewController?
@@ -92,11 +97,13 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
init(
context: AccountContext,
auctionContext: GiftAuctionContext,
peerId: EnginePeer.Id?,
animateOut: ActionSlot<Action<()>>,
getController: @escaping () -> ViewController?
) {
self.context = context
self.auctionContext = auctionContext
self.peerId = peerId
self.animateOut = animateOut
self.getController = getController
@@ -398,7 +405,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
}
let storeController = self.context.sharedContext.makeGiftStoreController(
context: self.context,
peerId: self.context.account.peerId,
peerId: self.peerId ?? self.context.account.peerId,
gift: gift
)
controller.push(storeController)
@@ -472,7 +479,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
}
func makeState() -> State {
return State(context: self.context, auctionContext: self.auctionContext, animateOut: self.animateOut, getController: self.getController)
return State(context: self.context, auctionContext: self.auctionContext, peerId: self.peerId, animateOut: self.animateOut, getController: self.getController)
}
static var body: Body {
@@ -1075,7 +1082,7 @@ private final class GiftAuctionViewSheetContent: CombinedComponent {
guard let state, let attributes = state.giftUpgradeAttributes else {
return
}
let variantsController = component.context.sharedContext.makeGiftUpgradeVariantsPreviewScreen(context: component.context, gift: .generic(gift), attributes: attributes)
let variantsController = component.context.sharedContext.makeGiftUpgradeVariantsScreen(context: component.context, gift: .generic(gift), attributes: attributes, selectedAttributes: nil, focusedAttribute: nil)
environment.controller()?.push(variantsController)
}, animateScale: false),
availableSize: CGSize(width: context.availableSize.width - 64.0, height: context.availableSize.height),
@@ -1276,13 +1283,16 @@ final class GiftAuctionViewSheetComponent: CombinedComponent {
let context: AccountContext
let auctionContext: GiftAuctionContext
let peerId: EnginePeer.Id?
init(
context: AccountContext,
auctionContext: GiftAuctionContext
auctionContext: GiftAuctionContext,
peerId: EnginePeer.Id?
) {
self.context = context
self.auctionContext = auctionContext
self.peerId = peerId
}
static func ==(lhs: GiftAuctionViewSheetComponent, rhs: GiftAuctionViewSheetComponent) -> Bool {
@@ -1307,6 +1317,7 @@ final class GiftAuctionViewSheetComponent: CombinedComponent {
content: AnyComponent<EnvironmentType>(GiftAuctionViewSheetContent(
context: context.component.context,
auctionContext: context.component.auctionContext,
peerId: context.component.peerId,
animateOut: animateOut,
getController: controller
)),
@@ -1391,6 +1402,7 @@ public final class GiftAuctionViewScreen: ViewControllerComponentContainer {
public init(
context: AccountContext,
auctionContext: GiftAuctionContext,
peerId: EnginePeer.Id?,
completion: @escaping (Signal<[GiftAuctionAcquiredGift], NoError>, [StarGift.UniqueGift.Attribute]?) -> Void
) {
self.completion = completion
@@ -1399,7 +1411,8 @@ public final class GiftAuctionViewScreen: ViewControllerComponentContainer {
context: context,
component: GiftAuctionViewSheetComponent(
context: context,
auctionContext: auctionContext
auctionContext: auctionContext,
peerId: peerId
),
navigationBarAppearance: .none,
statusBarStyle: .ignore,