mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-19 17:51:29 +00:00
Cleanup
This commit is contained in:
parent
7512f7f017
commit
a23deded22
@ -1790,6 +1790,7 @@ ios_application(
|
||||
#"//third-party/boringssl:ssl",
|
||||
#"//third-party/boringssl:crypto",
|
||||
#"//submodules/TelegramVoip",
|
||||
#"//third-party/libprisma",
|
||||
"//submodules/TelegramUI",
|
||||
],
|
||||
)
|
||||
|
@ -45,6 +45,29 @@ def escape_swift_string_literal_component(text: str) -> str:
|
||||
# For non-define flags or defines without shell quoting, just escape for Swift string literal
|
||||
return text.replace('\\', '\\\\').replace('"', '\\"')
|
||||
|
||||
# Parses -D flag into a tuple of (define_flag, define_value)
|
||||
# Example: flag="ABC" -> (ABC, None)
|
||||
# Example: flag="ABC=123" -> (ABC, 123)
|
||||
# Example: flag="ABC=\"str\"" -> (ABC, "str")
|
||||
def parse_define_flag(flag: str) -> tuple[str, str | None]:
|
||||
if flag.startswith("-D"):
|
||||
define_part = flag[2:]
|
||||
else:
|
||||
define_part = flag
|
||||
|
||||
# Check if there's an assignment
|
||||
if "=" in define_part:
|
||||
key, value = define_part.split("=", 1) # Split on first = only
|
||||
|
||||
# Handle quoted values - remove surrounding quotes if present
|
||||
if (value.startswith('"') and value.endswith('"')) or (value.startswith("'") and value.endswith("'")):
|
||||
value = value[1:-1] # Remove quotes
|
||||
|
||||
return (key, value)
|
||||
else:
|
||||
# No assignment, just a flag name
|
||||
return (define_part, None)
|
||||
|
||||
parsed_modules = {}
|
||||
for name, module in sorted(modules.items()):
|
||||
is_empty = False
|
||||
@ -60,6 +83,8 @@ for name, module in sorted(modules.items()):
|
||||
"is_empty": is_empty,
|
||||
}
|
||||
|
||||
spm_products = []
|
||||
spm_targets = []
|
||||
module_to_source_files = dict()
|
||||
modulemaps = dict()
|
||||
|
||||
@ -69,41 +94,136 @@ combined_lines.append("// The swift-tools-version declares the minimum version o
|
||||
combined_lines.append("")
|
||||
combined_lines.append("import PackageDescription")
|
||||
combined_lines.append("import Foundation")
|
||||
combined_lines.append("""
|
||||
func parseProduct(product: [String: Any]) -> Product {
|
||||
let name = product[\"name\"] as! String
|
||||
let targets = product[\"targets\"] as! [String]
|
||||
return .library(name: name, targets: targets)
|
||||
}""")
|
||||
combined_lines.append("""
|
||||
func parseTarget(target: [String: Any]) -> Target {
|
||||
let name = target["name"] as! String
|
||||
let dependencies = target["dependencies"] as! [String]
|
||||
|
||||
var swiftSettings: [SwiftSetting]?
|
||||
if let swiftSettingList = target["swiftSettings"] as? [[String: Any]] {
|
||||
var swiftSettingsValue: [SwiftSetting] = []
|
||||
swiftSettingsValue.append(.swiftLanguageMode(.v5))
|
||||
for swiftSetting in swiftSettingList {
|
||||
if swiftSetting["type"] as! String == "define" {
|
||||
swiftSettingsValue.append(.define(swiftSetting["name"] as! String))
|
||||
} else if swiftSetting["type"] as! String == "unsafeFlags" {
|
||||
swiftSettingsValue.append(.unsafeFlags(swiftSetting["flags"] as! [String]))
|
||||
} else {
|
||||
print("Unknown swift setting type: \\(swiftSetting["type"] as! String)")
|
||||
preconditionFailure("Unknown swift setting type: \\(swiftSetting["type"] as! String)")
|
||||
}
|
||||
}
|
||||
|
||||
swiftSettings = swiftSettingsValue
|
||||
}
|
||||
|
||||
var cSettings: [CSetting]?
|
||||
if let cSettingList = target["cSettings"] as? [[String: Any]] {
|
||||
var cSettingsValue: [CSetting] = []
|
||||
for cSetting in cSettingList {
|
||||
if cSetting["type"] as! String == "define" {
|
||||
cSettingsValue.append(.define(cSetting["name"] as! String))
|
||||
} else if cSetting["type"] as! String == "unsafeFlags" {
|
||||
cSettingsValue.append(.unsafeFlags(cSetting["flags"] as! [String]))
|
||||
} else {
|
||||
print("Unknown c setting type: \\(cSetting["type"] as! String)")
|
||||
preconditionFailure("Unknown c setting type: \\(cSetting["type"] as! String)")
|
||||
}
|
||||
}
|
||||
cSettings = cSettingsValue
|
||||
}
|
||||
|
||||
var cxxSettings: [CXXSetting]?
|
||||
if let cxxSettingList = target["cxxSettings"] as? [[String: Any]] {
|
||||
var cxxSettingsValue: [CXXSetting] = []
|
||||
for cxxSetting in cxxSettingList {
|
||||
if cxxSetting["type"] as! String == "define" {
|
||||
cxxSettingsValue.append(.define(cxxSetting["name"] as! String))
|
||||
} else if cxxSetting["type"] as! String == "unsafeFlags" {
|
||||
cxxSettingsValue.append(.unsafeFlags(cxxSetting["flags"] as! [String]))
|
||||
} else {
|
||||
print("Unknown cxx setting type: \\(cxxSetting["type"] as! String)")
|
||||
preconditionFailure("Unknown cxx setting type: \\(cxxSetting["type"] as! String)")
|
||||
}
|
||||
}
|
||||
cxxSettings = cxxSettingsValue
|
||||
}
|
||||
|
||||
var linkerSettings: [LinkerSetting]?
|
||||
if let linkerSettingList = target["linkerSettings"] as? [[String: Any]] {
|
||||
var linkerSettingsValue: [LinkerSetting] = []
|
||||
for linkerSetting in linkerSettingList {
|
||||
if linkerSetting["type"] as! String == "framework" {
|
||||
linkerSettingsValue.append(.linkedFramework(linkerSetting["name"] as! String))
|
||||
} else if linkerSetting["type"] as! String == "library" {
|
||||
linkerSettingsValue.append(.linkedLibrary(linkerSetting["name"] as! String))
|
||||
} else {
|
||||
print("Unknown linker setting type: \\(linkerSetting["type"] as! String)")
|
||||
preconditionFailure("Unknown linker setting type: \\(linkerSetting["type"] as! String)")
|
||||
}
|
||||
}
|
||||
linkerSettings = linkerSettingsValue
|
||||
}
|
||||
|
||||
return .target(
|
||||
name: name,
|
||||
dependencies: dependencies.map({ .target(name: $0) }),
|
||||
path: (target["path"] as? String)!,
|
||||
exclude: [],
|
||||
sources: sourceFileMap[name]!,
|
||||
resources: nil,
|
||||
publicHeadersPath: target["publicHeadersPath"] as? String,
|
||||
packageAccess: true,
|
||||
cSettings: cSettings,
|
||||
cxxSettings: cxxSettings,
|
||||
swiftSettings: swiftSettings,
|
||||
linkerSettings: linkerSettings,
|
||||
plugins: nil
|
||||
)
|
||||
}
|
||||
""")
|
||||
combined_lines.append("")
|
||||
combined_lines.append("let sourceFileMap: [String: [String]] = try! JSONSerialization.jsonObject(with: Data(contentsOf: URL(fileURLWithPath: \"SourceFileMap.json\")), options: []) as! [String: [String]]")
|
||||
combined_lines.append("let packageData: [String: Any] = try! JSONSerialization.jsonObject(with: Data(contentsOf: URL(fileURLWithPath: \"PackageData.json\")), options: []) as! [String: Any]")
|
||||
combined_lines.append("let sourceFileMap: [String: [String]] = packageData[\"sourceFileMap\"] as! [String: [String]]")
|
||||
combined_lines.append("let products: [Product] = (packageData[\"products\"] as! [[String: Any]]).map(parseProduct)")
|
||||
combined_lines.append("let targets: [Target] = (packageData[\"targets\"] as! [[String: Any]]).map(parseTarget)")
|
||||
combined_lines.append("")
|
||||
combined_lines.append("let package = Package(")
|
||||
combined_lines.append(" name: \"Telegram\",")
|
||||
combined_lines.append(" platforms: [")
|
||||
combined_lines.append(" .iOS(.v13)")
|
||||
combined_lines.append(" ],")
|
||||
combined_lines.append(" products: [")
|
||||
combined_lines.append(" products: products,")
|
||||
|
||||
for name, module in sorted(modules.items()):
|
||||
if parsed_modules[name]["is_empty"]:
|
||||
continue
|
||||
|
||||
if module["type"] == "objc_library" or module["type"] == "swift_library" or module["type"] == "cc_library":
|
||||
combined_lines.append(" .library(name: \"%s\", targets: [\"%s\"])," % (module["name"], module["name"]))
|
||||
spm_products.append({
|
||||
"name": module["name"],
|
||||
"targets": [module["name"]],
|
||||
})
|
||||
|
||||
combined_lines.append(" ],")
|
||||
combined_lines.append(" targets: [")
|
||||
|
||||
class ModulemapStore:
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
def add(self, module_path, header_path):
|
||||
pass
|
||||
|
||||
for name, module in sorted(modules.items()):
|
||||
if parsed_modules[name]["is_empty"]:
|
||||
continue
|
||||
|
||||
module_type = module["type"]
|
||||
if module_type == "objc_library" or module_type == "cc_library" or module_type == "swift_library":
|
||||
spm_target = dict()
|
||||
|
||||
combined_lines.append(" .target(")
|
||||
combined_lines.append(" name: \"%s\"," % name)
|
||||
spm_target["name"] = name
|
||||
|
||||
relative_module_path = module["path"]
|
||||
module_directory = spm_files_dir + "/" + relative_module_path
|
||||
@ -122,13 +242,16 @@ for name, module in sorted(modules.items()):
|
||||
break
|
||||
|
||||
combined_lines.append(" dependencies: [")
|
||||
spm_target["dependencies"] = []
|
||||
for dep in module["deps"]:
|
||||
if not parsed_modules[dep]["is_empty"]:
|
||||
combined_lines.append(" .target(name: \"%s\")," % dep)
|
||||
spm_target["dependencies"].append(dep)
|
||||
combined_lines.append(" ],")
|
||||
|
||||
# All modules now use the symlinked directory path
|
||||
combined_lines.append(" path: \"%s\"," % relative_module_path)
|
||||
spm_target["path"] = relative_module_path
|
||||
|
||||
include_source_files = []
|
||||
exclude_source_files = []
|
||||
@ -188,6 +311,7 @@ for name, module in sorted(modules.items()):
|
||||
exclude_path = other_module["path"][len(module["path"]) + 1:]
|
||||
ignore_sub_folders.append(exclude_path)
|
||||
if len(ignore_sub_folders) != 0:
|
||||
spm_target["exclude"] = ignore_sub_folders
|
||||
combined_lines.append(" exclude: [")
|
||||
for sub_folder in ignore_sub_folders:
|
||||
combined_lines.append(f" \"{sub_folder}\",")
|
||||
@ -206,8 +330,10 @@ for name, module in sorted(modules.items()):
|
||||
if module_type == "objc_library" or module_type == "cc_library":
|
||||
if module_public_headers_prefix is not None and len(module_public_headers_prefix) != 0:
|
||||
combined_lines.append(f" publicHeadersPath: \"{module_public_headers_prefix}\",")
|
||||
spm_target["publicHeadersPath"] = module_public_headers_prefix
|
||||
else:
|
||||
combined_lines.append(" publicHeadersPath: \"\",")
|
||||
spm_target["publicHeadersPath"] = ""
|
||||
|
||||
if len(module["includes"]) > 1:
|
||||
print("{}: Multiple includes are not yet supported: {}".format(name, module["includes"]))
|
||||
@ -217,7 +343,9 @@ for name, module in sorted(modules.items()):
|
||||
cxxopts = module.get("cxxopts", [])
|
||||
|
||||
if defines or copts or (module_public_headers_prefix is not None):
|
||||
spm_target["cSettings"] = []
|
||||
combined_lines.append(" cSettings: [")
|
||||
|
||||
if defines:
|
||||
for define in defines:
|
||||
if "=" in define:
|
||||
@ -225,30 +353,43 @@ for name, module in sorted(modules.items()):
|
||||
sys.exit(1)
|
||||
else:
|
||||
combined_lines.append(f' .define("{define}"),')
|
||||
spm_target["cSettings"].append({
|
||||
"type": "define",
|
||||
"name": define
|
||||
})
|
||||
define_flags = []
|
||||
if copts:
|
||||
combined_lines.append(" .unsafeFlags([")
|
||||
unsafe_flags = []
|
||||
for flag in copts:
|
||||
escaped_flag = escape_swift_string_literal_component(flag)
|
||||
if escaped_flag.startswith("-I") and False:
|
||||
include_path = escaped_flag[2:]
|
||||
#print("{}: Include path: {}".format(name, include_path))
|
||||
found_reference = False
|
||||
for another_module_name, another_module in sorted(modules.items()):
|
||||
another_module_path = another_module["path"]
|
||||
if include_path.startswith(another_module_path):
|
||||
combined_lines.append(f' "-I{include_path}",')
|
||||
found_reference = True
|
||||
if not found_reference:
|
||||
print(f"{name}: Unresolved include path: {include_path}")
|
||||
sys.exit(1)
|
||||
if flag.startswith("-D"):
|
||||
define_flag, define_value = parse_define_flag(flag)
|
||||
define_flags.append((define_flag, define_value))
|
||||
spm_target["cSettings"].append({
|
||||
"type": "define",
|
||||
"name": define_flag,
|
||||
"value": define_value
|
||||
})
|
||||
else:
|
||||
escaped_flag = escape_swift_string_literal_component(flag)
|
||||
combined_lines.append(f' "{escaped_flag}",')
|
||||
unsafe_flags.append(escaped_flag)
|
||||
combined_lines.append(" ]),")
|
||||
#if module_public_headers_prefix is not None:
|
||||
# combined_lines.append(f" .headerSearchPath(\"{module_public_headers_prefix}\"),")
|
||||
spm_target["cSettings"].append({
|
||||
"type": "unsafeFlags",
|
||||
"flags": unsafe_flags
|
||||
})
|
||||
if len(define_flags) != 0:
|
||||
for (define_flag, define_value) in define_flags:
|
||||
if define_value is None:
|
||||
combined_lines.append(f' .define("{define_flag}"),')
|
||||
else:
|
||||
combined_lines.append(f' .define("{define_flag}", to: "{define_value}"),')
|
||||
|
||||
combined_lines.append(" ],")
|
||||
|
||||
if defines or cxxopts: # Check for defines OR cxxopts
|
||||
spm_target["cxxSettings"] = []
|
||||
combined_lines.append(" cxxSettings: [")
|
||||
if defines: # Add defines again if present, for C++ context
|
||||
for define in defines:
|
||||
@ -257,8 +398,13 @@ for name, module in sorted(modules.items()):
|
||||
sys.exit(1)
|
||||
else:
|
||||
combined_lines.append(f' .define("{define}"),')
|
||||
spm_target["cxxSettings"].append({
|
||||
"type": "define",
|
||||
"name": define
|
||||
})
|
||||
if cxxopts:
|
||||
combined_lines.append(" .unsafeFlags([")
|
||||
unsafe_flags = []
|
||||
for flag in cxxopts:
|
||||
if flag.startswith("-std=") and True:
|
||||
if flag != "-std=c++17":
|
||||
@ -268,17 +414,35 @@ for name, module in sorted(modules.items()):
|
||||
continue
|
||||
escaped_flag = escape_swift_string_literal_component(flag)
|
||||
combined_lines.append(f' "{escaped_flag}",')
|
||||
unsafe_flags.append(escaped_flag)
|
||||
combined_lines.append(" ])")
|
||||
spm_target["cxxSettings"].append({
|
||||
"type": "unsafeFlags",
|
||||
"flags": unsafe_flags
|
||||
})
|
||||
combined_lines.append(" ],")
|
||||
|
||||
spm_target["linkerSettings"] = []
|
||||
combined_lines.append(" linkerSettings: [")
|
||||
if module_type == "objc_library":
|
||||
for framework in module["sdk_frameworks"]:
|
||||
combined_lines.append(" .linkedFramework(\"%s\")," % framework)
|
||||
spm_target["linkerSettings"].append({
|
||||
"type": "framework",
|
||||
"name": framework
|
||||
})
|
||||
for dylib in module["sdk_dylibs"]:
|
||||
combined_lines.append(" .linkedLibrary(\"%s\")," % dylib)
|
||||
spm_target["linkerSettings"].append({
|
||||
"type": "library",
|
||||
"name": dylib
|
||||
})
|
||||
spm_target["linkerSettings"].append({
|
||||
"type": "library",
|
||||
"name": dylib
|
||||
})
|
||||
combined_lines.append(" ]")
|
||||
|
||||
|
||||
elif module_type == "swift_library":
|
||||
defines = module.get("defines", [])
|
||||
swift_copts = module.get("copts", []) # These are actual swiftc flags
|
||||
@ -286,10 +450,16 @@ for name, module in sorted(modules.items()):
|
||||
# Handle cSettings for defines if they exist
|
||||
if defines:
|
||||
combined_lines.append(" cSettings: [")
|
||||
spm_target["cSettings"] = []
|
||||
for define in defines:
|
||||
combined_lines.append(f' .define("{define}"),')
|
||||
spm_target["cSettings"].append({
|
||||
"type": "define",
|
||||
"name": define
|
||||
})
|
||||
combined_lines.append(" ],")
|
||||
|
||||
spm_target["swiftSettings"] = []
|
||||
# Handle swiftSettings
|
||||
combined_lines.append(" swiftSettings: [")
|
||||
combined_lines.append(" .swiftLanguageMode(.v5),")
|
||||
@ -299,16 +469,28 @@ for name, module in sorted(modules.items()):
|
||||
# For Swift settings, the define is passed as a single string, e.g., "KEY=VALUE" or "FLAG"
|
||||
escaped_define = escape_swift_string_literal_component(define) # Escape the whole define string
|
||||
combined_lines.append(f' .define("{escaped_define}"),')
|
||||
spm_target["swiftSettings"].append({
|
||||
"type": "define",
|
||||
"name": define
|
||||
})
|
||||
|
||||
# Add copts (swiftc flags) to unsafeFlags in swiftSettings
|
||||
if swift_copts:
|
||||
combined_lines.append(" .unsafeFlags([")
|
||||
unsafe_flags = []
|
||||
for flag in swift_copts:
|
||||
escaped_flag = escape_swift_string_literal_component(flag)
|
||||
combined_lines.append(f' "{escaped_flag}",')
|
||||
unsafe_flags.append(escaped_flag)
|
||||
combined_lines.append(" ])")
|
||||
spm_target["swiftSettings"].append({
|
||||
"type": "unsafeFlags",
|
||||
"flags": unsafe_flags
|
||||
})
|
||||
combined_lines.append(" ]")
|
||||
combined_lines.append(" ),")
|
||||
|
||||
spm_targets.append(spm_target)
|
||||
elif module["type"] == "root":
|
||||
pass
|
||||
else:
|
||||
@ -323,8 +505,13 @@ combined_lines.append("")
|
||||
with open("spm-files/Package.swift", "w") as f:
|
||||
f.write("\n".join(combined_lines))
|
||||
|
||||
with open("spm-files/SourceFileMap.json", "w") as f:
|
||||
json.dump(module_to_source_files, f, indent=4)
|
||||
with open("spm-files/PackageData.json", "w") as f:
|
||||
package_data = {
|
||||
"sourceFileMap": module_to_source_files,
|
||||
"products": spm_products,
|
||||
"targets": spm_targets
|
||||
}
|
||||
json.dump(package_data, f, indent=4)
|
||||
|
||||
for modulemap_path, modulemap in modulemaps.items():
|
||||
module_map_contents = ""
|
||||
|
@ -6,6 +6,7 @@ import AsyncDisplayKit
|
||||
import YuvConversion
|
||||
import MediaResources
|
||||
import AnimationCompression
|
||||
import UIKit
|
||||
|
||||
private let sharedQueue = Queue()
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import SwiftSignalKit
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
||||
public enum AnimationRendererFrameType {
|
||||
|
@ -8,6 +8,7 @@ import ManagedFile
|
||||
import Accelerate
|
||||
import TelegramCore
|
||||
import WebPBinding
|
||||
import UIKit
|
||||
|
||||
private let sharedStoreQueue = Queue.concurrentDefaultQueue()
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
import AsyncDisplayKit
|
||||
|
@ -14,6 +14,7 @@ swift_library(
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/Markdown:Markdown",
|
||||
|
@ -22,6 +22,7 @@ import Markdown
|
||||
import AlertUI
|
||||
import InAppPurchaseManager
|
||||
import ObjectiveC
|
||||
import AVFoundation
|
||||
|
||||
private var ObjCKey_Delegate: Int?
|
||||
|
||||
|
@ -4,6 +4,7 @@ import Display
|
||||
import AsyncDisplayKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import LegacyComponents
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,4 +1,6 @@
|
||||
import Foundation
|
||||
import AsyncDisplayKit
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SwiftSignalKit
|
||||
|
@ -3,6 +3,7 @@ import ComponentFlow
|
||||
import Lottie
|
||||
import AppBundle
|
||||
import HierarchyTrackingLayer
|
||||
import UIKit
|
||||
import Display
|
||||
import GZip
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
||||
public final class ContextContentContainerNode: ASDisplayNode {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
||||
open class ContextReferenceContentNode: ASDisplayNode {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
||||
open class ContextControllerSourceNode: ContextReferenceContentNode {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import UIKitRuntimeUtils
|
||||
|
||||
public enum Keyboard {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
||||
public protocol MinimizedContainer: ASDisplayNode {
|
||||
|
@ -9,6 +9,9 @@ objc_library(
|
||||
hdrs = glob([
|
||||
"Sources/**/*.h",
|
||||
]),
|
||||
includes = [
|
||||
"Sources",
|
||||
],
|
||||
sdk_dylibs = [
|
||||
"libz",
|
||||
],
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import Display
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SSignalKit/SSignalKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TGGifConverter : NSObject
|
||||
|
||||
+ (SSignal *)convertGifToMp4:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SSignalKit/SSignalKit.h>
|
||||
|
||||
@protocol TGMediaSelectableItem
|
||||
|
@ -10,6 +10,7 @@ swift_library(
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
|
@ -10,6 +10,7 @@ import DeviceAccess
|
||||
import AccountContext
|
||||
import LegacyUI
|
||||
import SaveToCameraRoll
|
||||
import Photos
|
||||
|
||||
public func defaultVideoPresetForContext(_ context: AccountContext) -> TGMediaVideoConversionPreset {
|
||||
var networkType: NetworkType = .wifi
|
||||
|
@ -14,6 +14,7 @@ import MimeTypes
|
||||
import LocalMediaResources
|
||||
import LegacyUI
|
||||
import TextFormat
|
||||
import Photos
|
||||
|
||||
public func guessMimeTypeByFileExtension(_ ext: String) -> String {
|
||||
return TGMimeTypeMap.mimeType(forExtension: ext) ?? "application/binary"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import LegacyComponents
|
||||
import UIKit
|
||||
import Display
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
@ -13,6 +14,7 @@ import MediaEditor
|
||||
import DrawingUI
|
||||
import TelegramPresentationData
|
||||
import AnimatedCountLabelNode
|
||||
import CoreMedia
|
||||
|
||||
protocol LegacyPaintEntity {
|
||||
var position: CGPoint { get }
|
||||
@ -723,17 +725,16 @@ private class SendStarsButtonView: HighlightTrackingButton, TGPhotoSendStarsButt
|
||||
}
|
||||
}
|
||||
|
||||
//Xcode 16
|
||||
#if canImport(ContactProvider)
|
||||
extension SolidRoundedButtonView: @retroactive TGPhotoSolidRoundedButtonView {
|
||||
public func updateWidth(_ width: CGFloat) {
|
||||
let _ = self.updateLayout(width: width, transition: .immediate)
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if SWIFT_PACKAGE
|
||||
extension SolidRoundedButtonView: TGPhotoSolidRoundedButtonView {
|
||||
public func updateWidth(_ width: CGFloat) {
|
||||
let _ = self.updateLayout(width: width, transition: .immediate)
|
||||
}
|
||||
}
|
||||
#else
|
||||
extension SolidRoundedButtonView: @retroactive TGPhotoSolidRoundedButtonView {
|
||||
public func updateWidth(_ width: CGFloat) {
|
||||
let _ = self.updateLayout(width: width, transition: .immediate)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import LegacyComponents
|
||||
@ -8,6 +9,7 @@ import TelegramPresentationData
|
||||
import DeviceAccess
|
||||
import AccountContext
|
||||
import LocalMediaResources
|
||||
import Photos
|
||||
|
||||
public func legacyWallpaperPicker(context: AccountContext, presentationData: PresentationData, subject: DeviceAccessMediaLibrarySubject = .wallpaper) -> Signal<(LegacyComponentsContext) -> TGMediaAssetsController, Void> {
|
||||
return Signal { subscriber in
|
||||
|
@ -10,6 +10,7 @@ swift_library(
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import LegacyComponents
|
||||
import TelegramPresentationData
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import TelegramCore
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import MtProtoKit
|
||||
import Display
|
||||
|
@ -27,6 +27,7 @@ objc_library(
|
||||
],
|
||||
hdrs = glob([
|
||||
"lottiecpp/PublicHeaders/**/*.h",
|
||||
"lottiecpp/PublicHeaders/**/*.hpp",
|
||||
]),
|
||||
includes = [
|
||||
"lottiecpp/PublicHeaders",
|
||||
|
@ -5,6 +5,7 @@ import Postbox
|
||||
import TelegramCore
|
||||
import FFMpegBinding
|
||||
import RangeSet
|
||||
import CoreMedia
|
||||
|
||||
private func FFMpegLookaheadReader_readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: UnsafeMutablePointer<UInt8>?, bufferSize: Int32) -> Int32 {
|
||||
let context = Unmanaged<FFMpegLookaheadReader>.fromOpaque(userData!).takeUnretainedValue()
|
||||
|
@ -4,6 +4,7 @@ import Display
|
||||
import SwiftSignalKit
|
||||
import RangeSet
|
||||
import TextFormat
|
||||
import UIKit
|
||||
|
||||
public enum MediaPlayerScrubbingNodeCap {
|
||||
case square
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import UIKit
|
||||
import Display
|
||||
|
||||
public enum MediaPlayerTimeTextNodeMode {
|
||||
|
@ -9,6 +9,7 @@ import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import FFMpegBinding
|
||||
import CoreMedia
|
||||
|
||||
private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: UnsafeMutablePointer<UInt8>?, bufferSize: Int32) -> Int32 {
|
||||
let context = Unmanaged<UniversalSoftwareVideoSourceImpl>.fromOpaque(userData!).takeUnretainedValue()
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <EncryptionProvider/EncryptionProvider.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
@ -11,6 +11,9 @@ objc_library(
|
||||
includes = [
|
||||
"Sources",
|
||||
],
|
||||
copts = [
|
||||
"-Werror",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
|
@ -127,7 +127,7 @@ static bool ProgressWindowIsLight = true;
|
||||
[self dismiss:animated completion:nil];
|
||||
}
|
||||
|
||||
- (void)dismiss:(bool)animated completion:(void (^)())completion
|
||||
- (void)dismiss:(bool)animated completion:(void (^)(void))completion
|
||||
{
|
||||
if (animated)
|
||||
{
|
||||
|
@ -117,8 +117,6 @@ static void drawSvgPath(CGContextRef context, NSString *path) {
|
||||
}
|
||||
}
|
||||
|
||||
static bool ProxyWindowIsLight = true;
|
||||
|
||||
@interface ProxySpinnerView : UIView
|
||||
|
||||
@property (nonatomic, copy) void (^onSuccess)(void);
|
||||
|
@ -10,6 +10,7 @@ swift_library(
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
|
@ -2,6 +2,7 @@ import Foundation
|
||||
import UIKit
|
||||
import LegacyComponents
|
||||
import Display
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import AnimatedStickerNode
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SSignalKit/SSubscriber.h>
|
||||
|
||||
@interface SSignal : NSObject
|
||||
|
@ -1,3 +1,4 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SSignalKit/SDisposable.h>
|
||||
|
||||
@interface SSubscriber : NSObject <SDisposable>
|
||||
|
@ -10,6 +10,7 @@ swift_library(
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
|
@ -10,6 +10,8 @@ import LocalMediaResources
|
||||
import AVFoundation
|
||||
import LegacyComponents
|
||||
import ShareItemsImpl
|
||||
import UIKit
|
||||
import SSignalKit
|
||||
|
||||
public enum UnpreparedShareItemContent {
|
||||
case contact(DeviceContactExtendedData)
|
||||
@ -206,6 +208,13 @@ private func preparedShareItem(postbox: Postbox, network: Network, to peerId: Pe
|
||||
}
|
||||
}
|
||||
if isGif {
|
||||
#if DEBUG
|
||||
let signal = SSignal(generator: { _ in
|
||||
return SBlockDisposable(block: {})
|
||||
})
|
||||
let _ = signal.start(next: nil, error: nil, completed: nil)
|
||||
#endif
|
||||
|
||||
let convertedData = Signal<(Data, CGSize, Double, Bool), NoError> { subscriber in
|
||||
let disposable = MetaDisposable()
|
||||
let signalDisposable = TGGifConverter.convertGif(toMp4: data).start(next: { next in
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
import AsyncDisplayKit
|
||||
import UIKit
|
||||
import Display
|
||||
import GenerateStickerPlaceholderImage
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import TelegramCore
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import ComponentFlow
|
||||
|
1
submodules/Stripe/BUILD
vendored
1
submodules/Stripe/BUILD
vendored
@ -15,6 +15,7 @@ objc_library(
|
||||
],
|
||||
copts = [
|
||||
"-I{}/PublicHeaders/Stripe".format(package_name()),
|
||||
"-Werror",
|
||||
],
|
||||
sdk_frameworks = [
|
||||
"Foundation",
|
||||
|
@ -123,8 +123,6 @@ static NSString *const STPSDKVersion = @"9.1.0";
|
||||
*/
|
||||
+ (BOOL)canSubmitPaymentRequest:(PKPaymentRequest *)paymentRequest NS_AVAILABLE_IOS(8_0);
|
||||
|
||||
+ (BOOL)deviceSupportsApplePay;
|
||||
|
||||
/**
|
||||
* A convenience method to return a `PKPaymentRequest` with sane default values. You will still need to configure the `paymentSummaryItems` property to indicate
|
||||
*what the user is purchasing, as well as the optional `requiredShippingAddressFields`, `requiredBillingAddressFields`, and `shippingMethods` properties to indicate
|
||||
@ -201,8 +199,6 @@ typedef void (^STPCompletionBlock)(STPToken * __nullable token, NSError * __null
|
||||
publishableKey:(NSString *)publishableKey
|
||||
completion:(nullable STPCompletionBlock)handler __attribute__((deprecated));
|
||||
|
||||
+ (BOOL)deviceSupportsApplePay;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -242,9 +242,6 @@ static NSString *const stripeAPIVersion = @"2015-10-12";
|
||||
@implementation Stripe (ApplePay)
|
||||
|
||||
+ (BOOL)canSubmitPaymentRequest:(PKPaymentRequest *)paymentRequest {
|
||||
if (![self deviceSupportsApplePay]) {
|
||||
return NO;
|
||||
}
|
||||
if (paymentRequest == nil) {
|
||||
return NO;
|
||||
}
|
||||
@ -256,16 +253,10 @@ static NSString *const stripeAPIVersion = @"2015-10-12";
|
||||
|
||||
+ (NSArray<NSString *> *)supportedPKPaymentNetworks {
|
||||
NSArray *supportedNetworks = @[PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa];
|
||||
if ((&PKPaymentNetworkDiscover) != NULL) {
|
||||
supportedNetworks = [supportedNetworks arrayByAddingObject:PKPaymentNetworkDiscover];
|
||||
}
|
||||
supportedNetworks = [supportedNetworks arrayByAddingObject:PKPaymentNetworkDiscover];
|
||||
return supportedNetworks;
|
||||
}
|
||||
|
||||
+ (BOOL)deviceSupportsApplePay {
|
||||
return [PKPaymentAuthorizationViewController class] && [PKPaymentAuthorizationViewController canMakePaymentsUsingNetworks:[self supportedPKPaymentNetworks]];
|
||||
}
|
||||
|
||||
+ (PKPaymentRequest *)paymentRequestWithMerchantIdentifier:(NSString *)merchantIdentifier {
|
||||
if (![PKPaymentRequest class]) {
|
||||
return nil;
|
||||
|
@ -51,7 +51,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* An icon representing Visa.
|
||||
*/
|
||||
+ (UIImage *)visaCardImage;
|
||||
+ (UIImage *)otherCardImage;
|
||||
|
||||
/**
|
||||
* An icon to use when the type of the card is unknown.
|
||||
|
@ -50,8 +50,7 @@
|
||||
|
||||
- (BOOL)applePayEnabled {
|
||||
return self.appleMerchantIdentifier &&
|
||||
(self.additionalPaymentMethods & STPPaymentMethodTypeApplePay) &&
|
||||
[Stripe deviceSupportsApplePay];
|
||||
(self.additionalPaymentMethods & STPPaymentMethodTypeApplePay);
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -22,6 +22,13 @@
|
||||
|
||||
@implementation STPToken
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
return self.tokenId ?: @"Unknown token";
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ swift_library(
|
||||
":TelegramCallsUIBundle",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -19,6 +19,7 @@ import AlertComponent
|
||||
import TelegramPresentationData
|
||||
import ComponentFlow
|
||||
import MultilineTextComponent
|
||||
import AVFoundation
|
||||
|
||||
private func resolvedEmojiKey(data: Data) -> [String] {
|
||||
let resolvedKey = stringForEmojiHashOfData(data, 4) ?? []
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import AccountContext
|
||||
import TelegramCore
|
||||
@ -12,6 +13,7 @@ import WebSearchUI
|
||||
import MapResourceToAvatarSizes
|
||||
import LegacyUI
|
||||
import LegacyMediaPickerUI
|
||||
import AVFoundation
|
||||
|
||||
extension VideoChatScreenComponent.View {
|
||||
func openParticipantContextMenu(id: EnginePeer.Id, sourceView: ContextExtractedContentContainingView, gesture: ContextGesture?) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import Postbox
|
||||
|
@ -10,6 +10,7 @@ swift_library(
|
||||
"-warnings-as-errors",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/LegacyComponents",
|
||||
|
@ -4,6 +4,7 @@ import LegacyComponents
|
||||
import Display
|
||||
import TelegramCore
|
||||
import Postbox
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import AccountContext
|
||||
import ShareController
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,3 +1,4 @@
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import ComponentFlow
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import ComponentFlow
|
||||
|
@ -2,6 +2,7 @@ import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import AsyncDisplayKit
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
||||
|
@ -103,6 +103,7 @@ swift_library(
|
||||
"//submodules/StickerResources",
|
||||
"//submodules/TelegramUI/Components/StorageUsageScreen",
|
||||
"//submodules/TelegramUI/Components/Stories/StoryContainerScreen",
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit",
|
||||
"//submodules/TelegramBaseController",
|
||||
"//submodules/TelegramCallsUI",
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,4 +1,5 @@
|
||||
import AsyncDisplayKit
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SwiftSignalKit
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,3 +1,4 @@
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import ComponentFlow
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import AccountContext
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
|
@ -1,4 +1,5 @@
|
||||
import AsyncDisplayKit
|
||||
import UIKit
|
||||
import Display
|
||||
import ComponentFlow
|
||||
import TelegramCore
|
||||
|
@ -1,5 +1,6 @@
|
||||
import AsyncDisplayKit
|
||||
import AVFoundation
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SwiftSignalKit
|
||||
|
@ -1,5 +1,6 @@
|
||||
import AsyncDisplayKit
|
||||
import AVFoundation
|
||||
import UIKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SwiftSignalKit
|
||||
|
@ -15,8 +15,8 @@ import ChatListSearchItemHeader
|
||||
import ContactsPeerItem
|
||||
|
||||
//Xcode 16
|
||||
#if canImport(ContactProvider)
|
||||
extension NavigationBarSearchContentNode: @retroactive ItemListControllerSearchNavigationContentNode {
|
||||
#if SWIFT_PACKAGE
|
||||
extension NavigationBarSearchContentNode: ItemListControllerSearchNavigationContentNode {
|
||||
public func activate() {
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ extension NavigationBarSearchContentNode: @retroactive ItemListControllerSearchN
|
||||
}
|
||||
}
|
||||
#else
|
||||
extension NavigationBarSearchContentNode: ItemListControllerSearchNavigationContentNode {
|
||||
extension NavigationBarSearchContentNode: @retroactive ItemListControllerSearchNavigationContentNode {
|
||||
public func activate() {
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ swift_library(
|
||||
],
|
||||
deps = [
|
||||
"//submodules/Postbox",
|
||||
"//submodules/SSignalKit/SSignalKit",
|
||||
"//submodules/SSignalKit/SwiftSignalKit",
|
||||
"//submodules/TelegramCore",
|
||||
"//submodules/LegacyComponents",
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import SSignalKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import LegacyComponents
|
||||
@ -785,7 +786,7 @@ public func fetchLocalFileGifMediaResource(resource: LocalFileGifMediaResource)
|
||||
|
||||
let disposable = MetaDisposable()
|
||||
if let data = try? Data(contentsOf: URL(fileURLWithPath: resource.path), options: Data.ReadingOptions.mappedIfSafe) {
|
||||
let signal = TGGifConverter.convertGif(toMp4: data)!
|
||||
let signal = TGGifConverter.convertGif(toMp4: data)
|
||||
let signalDisposable = signal.start(next: { next in
|
||||
if let result = next as? NSDictionary, let path = result["path"] as? String {
|
||||
var value = stat()
|
||||
|
@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import ComponentFlow
|
||||
|
@ -16,6 +16,7 @@ import HexColor
|
||||
import PresentationDataUtils
|
||||
import MediaPickerUI
|
||||
import WallpaperGalleryScreen
|
||||
import Photos
|
||||
|
||||
public enum WallpaperSelectionResult {
|
||||
case remove
|
||||
|
@ -15,6 +15,7 @@ import ICloudResources
|
||||
import FetchVideoMediaResource
|
||||
import FetchAudioMediaResource
|
||||
import Display
|
||||
import UIKit
|
||||
|
||||
public func makeTelegramAccountAuxiliaryMethods(uploadInBackground: ((Postbox, MediaResource) -> Signal<String?, NoError>)?) -> AccountAuxiliaryMethods {
|
||||
return AccountAuxiliaryMethods(fetchResource: { postbox, resource, ranges, _ in
|
||||
|
@ -4,6 +4,7 @@ import SwiftSignalKit
|
||||
import UniversalMediaPlayer
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import AccountContext
|
||||
import TelegramAudio
|
||||
|
@ -11,6 +11,8 @@ import UniversalMediaPlayer
|
||||
import AccountContext
|
||||
import PhotoResources
|
||||
import RangeSet
|
||||
import CoreMedia
|
||||
import AVFoundation
|
||||
|
||||
public final class SystemVideoContent: UniversalVideoContent {
|
||||
public let id: AnyHashable
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user