mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-07-15 20:17:20 +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:
@@ -1,5 +1,5 @@
|
||||
import UIKit
|
||||
import SwiftSignalKit
|
||||
@preconcurrency import SwiftSignalKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import UserNotifications
|
||||
@@ -41,7 +41,8 @@ import MediaEditor
|
||||
import TelegramUIDeclareEncodables
|
||||
import ContextMenuScreen
|
||||
import MetalEngine
|
||||
import RecaptchaEnterprise
|
||||
import RecaptchaEnterpriseSDK
|
||||
import NavigationBarImpl
|
||||
|
||||
#if canImport(AppCenter)
|
||||
import AppCenter
|
||||
@@ -330,6 +331,10 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
|
||||
let launchStartTime = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
defaultNavigationBarImpl = { presentationData in
|
||||
return NavigationBarImpl(presentationData: presentationData)
|
||||
}
|
||||
|
||||
let (window, hostView) = nativeWindowHostView()
|
||||
let statusBarHost = ApplicationStatusBarHost(scene: window.windowScene)
|
||||
self.mainWindow = Window1(hostView: hostView, statusBarHost: statusBarHost)
|
||||
@@ -2417,15 +2422,25 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
if let proxyData = parseProxyUrl(sharedContext: sharedContext, url: url) {
|
||||
authContext.rootController.view.endEditing(true)
|
||||
let presentationData = authContext.sharedContext.currentPresentationData.with { $0 }
|
||||
let controller = ProxyServerActionSheetController(presentationData: presentationData, accountManager: authContext.sharedContext.accountManager, postbox: authContext.account.postbox, network: authContext.account.network, server: proxyData, updatedPresentationData: nil)
|
||||
let controller = ProxyServerActionSheetController(sharedContext: authContext.sharedContext, presentationData: presentationData, accountManager: authContext.sharedContext.accountManager, postbox: authContext.account.postbox, network: authContext.account.network, server: proxyData, updatedPresentationData: nil)
|
||||
authContext.rootController.currentWindow?.present(controller, on: PresentationSurfaceLevel.root, blockInteraction: false, completion: {})
|
||||
} else if let secureIdData = parseSecureIdUrl(url) {
|
||||
let presentationData = authContext.sharedContext.currentPresentationData.with { $0 }
|
||||
authContext.rootController.currentWindow?.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: nil, text: presentationData.strings.Passport_NotLoggedInMessage, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Calls_NotNow, action: {
|
||||
if let callbackUrl = URL(string: secureIdCallbackUrl(with: secureIdData.callbackUrl, peerId: secureIdData.peerId, result: .cancel, parameters: [:])) {
|
||||
UIApplication.shared.open(callbackUrl, options: [:], completionHandler: nil)
|
||||
}
|
||||
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), on: .root, blockInteraction: false, completion: {})
|
||||
|
||||
let alertController = textAlertController(
|
||||
sharedContext: authContext.sharedContext,
|
||||
title: nil,
|
||||
text: presentationData.strings.Passport_NotLoggedInMessage,
|
||||
actions: [
|
||||
TextAlertAction(type: .genericAction, title: presentationData.strings.Calls_NotNow, action: {
|
||||
if let callbackUrl = URL(string: secureIdCallbackUrl(with: secureIdData.callbackUrl, peerId: secureIdData.peerId, result: .cancel, parameters: [:])) {
|
||||
UIApplication.shared.open(callbackUrl, options: [:], completionHandler: nil)
|
||||
}
|
||||
}),
|
||||
TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})
|
||||
]
|
||||
)
|
||||
authContext.rootController.currentWindow?.present(alertController, on: .root, blockInteraction: false, completion: {})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -2960,12 +2975,18 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
||||
}
|
||||
if currentVersion < version {
|
||||
let presentationData = sharedContext.sharedContext.currentPresentationData.with { $0 }
|
||||
sharedContext.sharedContext.mainWindow?.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: nil, text: "A new build is available", actions: [
|
||||
TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}),
|
||||
TextAlertAction(type: .defaultAction, title: "Show", action: {
|
||||
sharedContext.sharedContext.applicationBindings.openUrl(releaseNotesUrl)
|
||||
})
|
||||
]), on: .root, blockInteraction: false, completion: {})
|
||||
let alertController = textAlertController(
|
||||
sharedContext: sharedContext.sharedContext,
|
||||
title: "A new build is available",
|
||||
text: "",
|
||||
actions: [
|
||||
TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}),
|
||||
TextAlertAction(type: .defaultAction, title: "Show", action: {
|
||||
sharedContext.sharedContext.applicationBindings.openUrl(releaseNotesUrl)
|
||||
})
|
||||
]
|
||||
)
|
||||
sharedContext.sharedContext.mainWindow?.present(alertController, on: .root, blockInteraction: false, completion: {})
|
||||
}
|
||||
}))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user