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 62337 additions and 40559 deletions
@@ -21,6 +21,8 @@ swift_library(
"//submodules/Components/MultilineTextComponent",
"//submodules/Components/BalancedTextComponent",
"//submodules/TelegramUI/Components/EmojiStatusComponent",
"//submodules/TelegramUI/Components/AlertComponent",
"//submodules/TelegramUI/Components/AlertComponent/AlertInputFieldComponent",
],
visibility = [
"//visibility:public",
@@ -11,6 +11,8 @@ import ComponentFlow
import MultilineTextComponent
import BalancedTextComponent
import EmojiStatusComponent
import AlertComponent
import AlertInputFieldComponent
private final class PromptInputFieldNode: ASDisplayNode, ASEditableTextNodeDelegate {
private var theme: PresentationTheme
@@ -500,6 +502,100 @@ public enum PromptControllerTitleFont {
}
public func quickReplyNameAlertController(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)? = nil, text: String, subtext: String, titleFont: PromptControllerTitleFont = .regular, value: String?, characterLimit: Int = 1000, apply: @escaping (String?) -> Void) -> AlertController {
// let presentationData = context.sharedContext.currentPresentationData.with { $0 }
// let strings = presentationData.strings
//
// let inputState = AlertInputFieldComponent.ExternalState()
//
// let doneIsEnabled: Signal<Bool, NoError> = inputState.valueSignal
// |> map { value in
// return !value.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
// }
//
// let doneInProgressValuePromise = ValuePromise<Bool>(false)
// let doneInProgress = doneInProgressValuePromise.get()
//
// var content: [AnyComponentWithIdentity<AlertComponentEnvironment>] = []
// content.append(AnyComponentWithIdentity(
// id: "title",
// component: AnyComponent(
// AlertTitleComponent(title: strings.WebBrowser_Exceptions_Create_Title)
// )
// ))
// content.append(AnyComponentWithIdentity(
// id: "text",
// component: AnyComponent(
// AlertTextComponent(content: .plain(strings.WebBrowser_Exceptions_Create_Text))
// )
// ))
//
// let domainRegex = try? NSRegularExpression(pattern: "^(https?://)?([a-zA-Z0-9-]+\\.?)*([a-zA-Z]*)?(:)?(/)?$", options: [])
// let pathRegex = try? NSRegularExpression(pattern: "^(https?://)?([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}/", options: [])
// var applyImpl: (() -> Void)?
// content.append(AnyComponentWithIdentity(
// id: "input",
// component: AnyComponent(
// AlertInputFieldComponent(
// context: context,
// initialValue: nil,
// placeholder: strings.QuickReply_ShortcutPlaceholder,
// characterLimit: characterLimit,
// hasClearButton: false,
// keyboardType: .URL,
// autocapitalizationType: .none,
// autocorrectionType: .no,
// isInitiallyFocused: true,
// externalState: inputState,
// shouldChangeText: { updatedText in
// guard let domainRegex, let pathRegex else {
// return true
// }
// let domainMatches = domainRegex.matches(in: updatedText, options: [], range: NSRange(location: 0, length: updatedText.utf16.count))
// let pathMatches = pathRegex.matches(in: updatedText, options: [], range: NSRange(location: 0, length: updatedText.utf16.count))
// if domainMatches.count > 0, pathMatches.count == 0 {
// return true
// } else {
// return false
// }
// },
// returnKeyAction: {
// applyImpl?()
// }
// )
// )
// ))
//
// var effectiveUpdatedPresentationData: (PresentationData, Signal<PresentationData, NoError>)
// if let updatedPresentationData {
// effectiveUpdatedPresentationData = updatedPresentationData
// } else {
// effectiveUpdatedPresentationData = (presentationData, context.sharedContext.presentationData)
// }
//
// let alertController = AlertScreen(
// configuration: AlertScreen.Configuration(allowInputInset: true),
// content: content,
// actions: [
// .init(title: strings.Common_Cancel, action: {
// apply(nil)
// }),
// .init(title: strings.Common_Done, type: .default, action: {
// applyImpl?()
// }, autoDismiss: false, isEnabled: doneIsEnabled, progress: doneInProgress)
// ],
// updatedPresentationData: effectiveUpdatedPresentationData
// )
// applyImpl = {
// let updatedLink = explicitUrl(inputState.value)
// if !updatedLink.isEmpty && isValidUrl(updatedLink, validSchemes: ["http": true, "https": true]) {
// doneInProgressValuePromise.set(true)
// apply(updatedLink)
// } else {
// inputState.animateError()
// }
// }
// return alertController
let presentationData = updatedPresentationData?.initial ?? context.sharedContext.currentPresentationData.with { $0 }
var dismissImpl: ((Bool) -> Void)?