Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2025-06-20 00:16:50 +02:00
commit 6e4660dbc0
2004 changed files with 1386 additions and 14004 deletions

View File

@ -25,7 +25,6 @@ def transform_cache_host_into_http(grpc_url):
return transformed_url
def calculate_sha256(file_path):
sha256_hash = hashlib.sha256()
with open(file_path, "rb") as file:
@ -37,6 +36,8 @@ def calculate_sha256(file_path):
def resolve_cache_host(cache_host):
if cache_host is None:
return None
if cache_host.startswith("file://"):
return None
if "@auto" in cache_host:
host_parts = cache_host.split("@auto")
host_left_part = host_parts[0]
@ -44,7 +45,18 @@ def resolve_cache_host(cache_host):
return f"{host_left_part}localhost{host_right_part}"
return cache_host
def locate_bazel(base_path, cache_host):
def resolve_cache_path(cache_host_or_path, cache_dir):
if cache_dir is not None:
return cache_dir
if cache_host_or_path is not None:
if cache_host_or_path.startswith("file://"):
return cache_host_or_path.replace("file://", "")
return None
def cache_cas_name(digest):
return (digest[:2], digest)
def locate_bazel(base_path, cache_host_or_path, cache_dir):
build_input_dir = '{}/build-input'.format(base_path)
if not os.path.isdir(build_input_dir):
os.mkdir(build_input_dir)
@ -57,7 +69,8 @@ def locate_bazel(base_path, cache_host):
bazel_name = 'bazel-{version}-{arch}'.format(version=versions.bazel_version, arch=arch)
bazel_path = '{}/build-input/{}'.format(base_path, bazel_name)
resolved_cache_host = resolve_cache_host(cache_host)
resolved_cache_host = resolve_cache_host(cache_host_or_path)
resolved_cache_path = resolve_cache_path(cache_host_or_path, cache_dir)
if not os.path.isfile(bazel_path):
if resolved_cache_host is not None and versions.bazel_version_sha256 is not None:
@ -77,6 +90,11 @@ def locate_bazel(base_path, cache_host):
test_sha256 = calculate_sha256(temp_output_file.name)
if test_sha256 == versions.bazel_version_sha256:
shutil.copyfile(temp_output_file.name, bazel_path)
elif resolved_cache_path is not None:
(cache_cas_id, cache_cas_name) = cache_cas_name(versions.bazel_version_sha256)
cached_path = '{}/cas/{}/{}'.format(resolved_cache_path, cache_cas_id, cache_cas_name)
if os.path.isfile(cached_path):
shutil.copyfile(cached_path, bazel_path)
if os.path.isfile(bazel_path) and versions.bazel_version_sha256 is not None:
@ -118,6 +136,11 @@ def locate_bazel(base_path, cache_host):
hash=versions.bazel_version_sha256
)
], check_result=False)
elif resolved_cache_path is not None:
(cache_cas_id, cache_cas_name) = cache_cas_name(versions.bazel_version_sha256)
cached_path = '{}/cas/{}/{}'.format(resolved_cache_path, cache_cas_id, cache_cas_name)
os.makedirs(os.path.dirname(cached_path), exist_ok=True)
shutil.copyfile(bazel_path, cached_path)
if not os.access(bazel_path, os.X_OK):
st = os.stat(bazel_path)

View File

@ -1282,7 +1282,7 @@ if __name__ == '__main__':
bazel_path = None
if args.bazel is None:
bazel_path = locate_bazel(base_path=os.getcwd(), cache_host=args.cacheHost)
bazel_path = locate_bazel(base_path=os.getcwd(), cache_host_or_path=args.cacheHost, cache_dir=args.cacheDir)
else:
bazel_path = args.bazel

View File

@ -27,7 +27,7 @@ class TartVMManager:
def __init__(self):
self.active_vms: Dict[str, Dict] = {}
def create_vm(self, session_id: str, image: str) -> Dict:
def create_vm(self, session_id: str, image: str, mount_directories: Dict[str, str]) -> Dict:
"""Create a new ephemeral VM for the session"""
vm_name = f"telegrambuild-{session_id}"
@ -53,9 +53,10 @@ class TartVMManager:
def run_vm():
"""Run the VM in background thread"""
try:
subprocess.run([
"tart", "run", vm_name
], check=True, capture_output=False, text=True)
run_arguments = ["tart", "run", vm_name]
for mount_directory in mount_directories.keys():
run_arguments.append(f"--dir={mount_directory}:{mount_directories[mount_directory]}")
subprocess.run(run_arguments, check=True, capture_output=False, text=True)
except subprocess.CalledProcessError as e:
logger.error(f"VM {vm_name} exited with error: {e}")
except Exception as e:
@ -462,10 +463,11 @@ class TartBuildSession(RemoteBuildSessionInterface):
class TartBuildSessionContext(RemoteBuildSessionContextInterface):
"""Context manager for Tart VM sessions"""
def __init__(self, vm_manager: TartVMManager, image: str, session_id: str):
def __init__(self, vm_manager: TartVMManager, image: str, session_id: str, mount_directories: Dict[str, str]):
self.vm_manager = vm_manager
self.image = image
self.session_id = session_id
self.mount_directories = mount_directories
self.session = None
def __enter__(self) -> TartBuildSession:
@ -473,7 +475,7 @@ class TartBuildSessionContext(RemoteBuildSessionContextInterface):
print(f"Creating VM session with image: {self.image}")
# Create the VM
self.vm_manager.create_vm(session_id=self.session_id, image=self.image)
self.vm_manager.create_vm(session_id=self.session_id, image=self.image, mount_directories=self.mount_directories)
print(f"✓ VM session created: {self.session_id}")
@ -502,12 +504,12 @@ class TartBuild(RemoteBuildInterface):
def __init__(self):
self.vm_manager = TartVMManager()
def session(self, macos_version: str, xcode_version: str) -> TartBuildSessionContext:
def session(self, macos_version: str, xcode_version: str, mount_directories: Dict[str, str]) -> TartBuildSessionContext:
image_name = f"macos-{macos_version}-xcode-{xcode_version}"
print(f"Image name: {image_name}")
session_id = str(uuid.uuid4())
return TartBuildSessionContext(self.vm_manager, image_name, session_id)
return TartBuildSessionContext(self.vm_manager, image_name, session_id, mount_directories)
def create_rsync_ignore_file(exclude_patterns: List[str] = []):
"""Create a temporary rsync ignore file with exclusion patterns"""
@ -551,7 +553,12 @@ def remote_build_tart(macos_version, bazel_cache_host, configuration, build_inpu
transient_data_dir = '{}/transient-data'.format(buildbox_dir)
os.makedirs(transient_data_dir, exist_ok=True)
with TartBuild().session(macos_version=macos_version, xcode_version=xcode_version) as session:
mount_directories = {}
if bazel_cache_host is not None and bazel_cache_host.startswith("file://"):
local_path = bazel_cache_host.replace("file://", "")
mount_directories["bazel-cache"] = local_path
with TartBuild().session(macos_version=macos_version, xcode_version=xcode_version, mount_directories=mount_directories) as session:
print('Uploading data to VM...')
session.upload_directory(local_path=build_input_data_path, remote_path="telegram-build-input")
@ -576,7 +583,10 @@ def remote_build_tart(macos_version, bazel_cache_host, configuration, build_inpu
python3 build-system/Make/ImportCertificates.py --path $HOME/telegram-build-input/certs
'''
if "@auto" in bazel_cache_host:
if bazel_cache_host is not None:
if bazel_cache_host.startswith("file://"):
pass
elif "@auto" in bazel_cache_host:
host_parts = bazel_cache_host.split("@auto")
host_left_part = host_parts[0]
host_right_part = host_parts[1]
@ -589,6 +599,9 @@ def remote_build_tart(macos_version, bazel_cache_host, configuration, build_inpu
guest_build_sh += 'python3 build-system/Make/Make.py \\'
if bazel_cache_host is not None:
if bazel_cache_host.startswith("file://"):
guest_build_sh += '--cacheDir="/Volumes/My Shared Files/bazel-cache" \\'
else:
guest_build_sh += '--cacheHost="$CACHE_HOST" \\'
guest_build_sh += 'build \\'
guest_build_sh += '--lock \\'

View File

@ -92,12 +92,29 @@ for name, module in sorted(modules.items()):
combined_lines.append(" .target(")
combined_lines.append(" name: \"%s\"," % name)
# Always create a symlinked directory for every module
relative_module_path = module["path"]
relative_module_path = module["path"] + "/Module_" + name
module_directory = spm_files_dir + "/" + relative_module_path
os.makedirs(module_directory, exist_ok=True)
module_sources_directory = module_directory + "/Sources"
if not os.path.exists(module_sources_directory):
os.makedirs(module_sources_directory)
module_public_includes_directory = module_directory + "/PublicIncludes"
if not os.path.exists(module_public_includes_directory):
os.makedirs(module_public_includes_directory)
module_public_headers_prefix = None
if len(module["includes"]) > 1:
print("{}: Multiple includes are not yet supported: {}".format(name, module["includes"]))
sys.exit(1)
elif len(module["includes"]) == 1:
for include_directory in module["includes"]:
if include_directory != ".":
#print("{}: Include directory: {}".format(name, include_directory))
module_public_headers_prefix = include_directory
break
combined_lines.append(" dependencies: [")
for dep in module["deps"]:
if not parsed_modules[dep]["is_empty"]:
@ -129,10 +146,20 @@ for name, module in sorted(modules.items()):
source_file_name = source[len(module["path"]) + 1:]
# Create symlink for this source file
symlink_location = os.path.join(module_directory, source_file_name)
source_dir = os.path.dirname(symlink_location)
if source_dir and not os.path.exists(source_dir):
os.makedirs(source_dir)
is_public_include = False
if module_public_headers_prefix is not None:
if source_file_name.startswith(module_public_headers_prefix):
symlink_location = os.path.join(module_public_includes_directory, source_file_name[len(module_public_headers_prefix) + 1:])
#print("{}: Public include: {}".format(source_file_name, symlink_location))
is_public_include = True
if not is_public_include:
symlink_location = os.path.join(module_sources_directory, source_file_name)
# Create parent directory for symlink if it doesn't exist
symlink_parent = os.path.dirname(symlink_location)
if not os.path.exists(symlink_parent):
os.makedirs(symlink_parent)
# Calculate relative path from symlink back to original file
# Count directory depth: spm-files/module_name/... -> workspace root
@ -143,32 +170,24 @@ for name, module in sorted(modules.items()):
# Create the symlink
if os.path.lexists(symlink_location):
os.unlink(symlink_location)
if "arm_arch64_common_macro" in symlink_target:
print("Creating symlink from {} to {}".format(symlink_target, symlink_location))
os.symlink(symlink_target, symlink_location)
# Add to sources list (exclude certain file types)
if not source.endswith(('.h', '.hpp', '.a', '.inc')):
combined_lines.append(" \"%s\"," % source_file_name)
combined_lines.append(" \"%s\"," % ("Sources/" + source_file_name))
combined_lines.append(" ],")
if module_type == "objc_library" or module_type == "cc_library":
if len(module["includes"]) == 0:
# Create dummy headers directory if none specified
dummy_headers_path = os.path.join(module_directory, "dummy-headers-path")
if not os.path.exists(dummy_headers_path):
os.makedirs(dummy_headers_path)
combined_lines.append(" publicHeadersPath: \"dummy-headers-path\",")
elif len(module["includes"]) == 1:
combined_lines.append(" publicHeadersPath: \"%s\"," % module["includes"][0])
else:
combined_lines.append(" publicHeadersPath: \"PublicIncludes\",")
if len(module["includes"]) > 1:
print("{}: Multiple includes are not yet supported: {}".format(name, module["includes"]))
sys.exit(1)
defines = module.get("defines", [])
copts = module.get("copts", [])
cxxopts = module.get("cxxopts", [])
if defines or copts:
if defines or copts or (module_public_headers_prefix is not None):
combined_lines.append(" cSettings: [")
if defines:
for define in defines:
@ -182,7 +201,32 @@ for name, module in sorted(modules.items()):
for flag in copts:
escaped_flag = escape_swift_string_literal_component(flag)
combined_lines.append(f' "{escaped_flag}",')
combined_lines.append(" ])")
if escaped_flag.startswith("-I"):
include_path = escaped_flag[2:]
print("{}: Include path: {}".format(name, include_path))
for another_module_name, another_module in sorted(modules.items()):
another_module_path = another_module["path"]
if include_path.startswith(another_module_path):
relative_module_include_path = include_path[len(another_module_path) + 1:]
#print(" {}: Matches module: {}".format(another_module_name, another_module_path))
combined_lines.append(f' "-I{another_module_path}/Sources/{relative_module_include_path}",')
another_module_public_headers_prefix = None
if len(another_module["includes"]) == 1:
for include_directory in another_module["includes"]:
if include_directory != ".":
another_module_public_headers_prefix = another_module_path + "/" + include_directory
print(" {}: Another module public include: {}".format(another_module_name, another_module_public_headers_prefix))
if another_module_public_headers_prefix is not None:
if include_path.startswith(another_module_public_headers_prefix):
relative_module_include_path = include_path[len(another_module_public_headers_prefix) + 1:]
print(" {}: Matches module public include: {}".format(another_module_name, another_module_public_headers_prefix))
combined_lines.append(f' -"-I{another_module_path}/PublicIncludes/{relative_module_include_path}",')
combined_lines.append(" ]),")
if module_public_headers_prefix is not None:
combined_lines.append(f" .headerSearchPath(\"{module_public_headers_prefix}\"),")
combined_lines.append(" ],")
if defines or cxxopts: # Check for defines OR cxxopts

View File

@ -1343,7 +1343,6 @@ public protocol AccountContext: AnyObject {
var downloadedMediaStoreManager: DownloadedMediaStoreManager { get }
var peerChannelMemberCategoriesContextsManager: PeerChannelMemberCategoriesContextsManager { get }
var wallpaperUploadManager: WallpaperUploadManager? { get }
var watchManager: WatchManager? { get }
var inAppPurchaseManager: InAppPurchaseManager? { get }
var starsContext: StarsContext? { get }

View File

@ -1,23 +0,0 @@
import Foundation
import SwiftSignalKit
import TelegramCore
public struct WatchRunningTasks: Equatable {
public let running: Bool
public let version: Int32
public init(running: Bool, version: Int32) {
self.running = running
self.version = version
}
public static func ==(lhs: WatchRunningTasks, rhs: WatchRunningTasks) -> Bool {
return lhs.running == rhs.running && lhs.version == rhs.version
}
}
public protocol WatchManager: AnyObject {
var watchAppInstalled: Signal<Bool, NoError> { get }
var navigateToMessageRequested: Signal<EngineMessage.Id, NoError> { get }
var runningTasks: Signal<WatchRunningTasks?, NoError> { get }
}

View File

@ -29,8 +29,7 @@ objc_library(
"PublicHeaders/**/*.h",
]),
copts = [
"-I{}/PublicHeaders/LegacyComponents".format(package_name()),
#"-Werror",
"-Werror",
],
includes = [
"PublicHeaders",

View File

@ -1,20 +1,20 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <LegacyComponents/ActionStage.h>
#import <LegacyComponents/ASActor.h>
#import <LegacyComponents/ASHandle.h>
#import <LegacyComponents/ASQueue.h>
#import <LegacyComponents/ASWatcher.h>
#import <LegacyComponents/AVURLAsset+TGMediaItem.h>
#import <LegacyComponents/ActionStage.h>
#import <LegacyComponents/Freedom.h>
#import <LegacyComponents/FreedomUIKit.h>
#import <LegacyComponents/JNWSpringAnimation.h>
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/LegacyComponentsAccessChecker.h>
#import <LegacyComponents/LegacyComponentsContext.h>
#import <LegacyComponents/LegacyComponentsGlobals.h>
#import <LegacyComponents/LegacyHTTPRequestOperation.h>
#import <LegacyComponents/lmdb.h>
#import <LegacyComponents/NSInputStream+TL.h>
#import <LegacyComponents/NSObject+TGLock.h>
#import <LegacyComponents/PGCamera.h>
@ -85,8 +85,8 @@
#import <LegacyComponents/TGCheckButtonView.h>
#import <LegacyComponents/TGContactMediaAttachment.h>
#import <LegacyComponents/TGConversation.h>
#import <LegacyComponents/TGDataResource.h>
#import <LegacyComponents/TGDatabaseMessageDraft.h>
#import <LegacyComponents/TGDataResource.h>
#import <LegacyComponents/TGDateUtils.h>
#import <LegacyComponents/TGDocumentAttributeAnimated.h>
#import <LegacyComponents/TGDocumentAttributeAudio.h>
@ -98,6 +98,7 @@
#import <LegacyComponents/TGDoubleTapGestureRecognizer.h>
#import <LegacyComponents/TGEmbedPIPButton.h>
#import <LegacyComponents/TGEmbedPIPPullArrowView.h>
#import <LegacyComponents/TGFileUtils.h>
#import <LegacyComponents/TGFont.h>
#import <LegacyComponents/TGForwardedMessageMediaAttachment.h>
#import <LegacyComponents/TGFullscreenContainerView.h>
@ -121,9 +122,10 @@
#import <LegacyComponents/TGLabel.h>
#import <LegacyComponents/TGListsTableView.h>
#import <LegacyComponents/TGLiveUploadInterface.h>
#import <LegacyComponents/TGLocalMessageMetaMediaAttachment.h>
#import <LegacyComponents/TGLocalization.h>
#import <LegacyComponents/TGLocalMessageMetaMediaAttachment.h>
#import <LegacyComponents/TGLocationMediaAttachment.h>
#import <LegacyComponents/TGMediaAsset+TGMediaEditableItem.h>
#import <LegacyComponents/TGMediaAsset.h>
#import <LegacyComponents/TGMediaAssetFetchResult.h>
#import <LegacyComponents/TGMediaAssetFetchResultChange.h>
@ -140,9 +142,19 @@
#import <LegacyComponents/TGMediaAvatarMenuMixin.h>
#import <LegacyComponents/TGMediaEditingContext.h>
#import <LegacyComponents/TGMediaOriginInfo.h>
#import <LegacyComponents/TGMediaPickerCell.h>
#import <LegacyComponents/TGMediaPickerController.h>
#import <LegacyComponents/TGMediaPickerGalleryInterfaceView.h>
#import <LegacyComponents/TGMediaPickerGalleryItem.h>
#import <LegacyComponents/TGMediaPickerGalleryModel.h>
#import <LegacyComponents/TGMediaPickerGalleryPhotoItem.h>
#import <LegacyComponents/TGMediaPickerGallerySelectedItemsModel.h>
#import <LegacyComponents/TGMediaPickerGalleryVideoItem.h>
#import <LegacyComponents/TGMediaPickerGalleryVideoItemView.h>
#import <LegacyComponents/TGMediaPickerLayoutMetrics.h>
#import <LegacyComponents/TGMediaPickerModernGalleryMixin.h>
#import <LegacyComponents/TGMediaPickerSendActionSheetController.h>
#import <LegacyComponents/TGMediaPickerToolbarView.h>
#import <LegacyComponents/TGMediaSelectionContext.h>
#import <LegacyComponents/TGMediaVideoConverter.h>
#import <LegacyComponents/TGMemoryImageCache.h>
@ -174,6 +186,7 @@
#import <LegacyComponents/TGMessageImageViewOverlayView.h>
#import <LegacyComponents/TGMessageViewCountContentProperty.h>
#import <LegacyComponents/TGModernBackToolbarButton.h>
#import <LegacyComponents/TGModernBarButton.h>
#import <LegacyComponents/TGModernButton.h>
#import <LegacyComponents/TGModernCache.h>
#import <LegacyComponents/TGModernConversationInputMicButton.h>
@ -203,16 +216,16 @@
#import <LegacyComponents/TGModernGalleryZoomableItemViewContent.h>
#import <LegacyComponents/TGModernGalleryZoomableScrollView.h>
#import <LegacyComponents/TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.h>
#import <LegacyComponents/TGModernMediaListItem.h>
#import <LegacyComponents/TGModernToolbarButton.h>
#import <LegacyComponents/TGNavigationBar.h>
#import <LegacyComponents/TGNavigationController.h>
#import <LegacyComponents/TGObserverProxy.h>
#import <LegacyComponents/TGOverlayController.h>
#import <LegacyComponents/TGOverlayControllerWindow.h>
#import <LegacyComponents/TGPIPAblePlayerView.h>
#import <LegacyComponents/TGPaintingData.h>
#import <LegacyComponents/TGPaintShader.h>
#import <LegacyComponents/TGPaintUtils.h>
#import <LegacyComponents/TGPaintingData.h>
#import <LegacyComponents/TGPassportAttachMenu.h>
#import <LegacyComponents/TGPassportICloud.h>
#import <LegacyComponents/TGPassportMRZ.h>
@ -220,23 +233,34 @@
#import <LegacyComponents/TGPassportScanController.h>
#import <LegacyComponents/TGPeerIdAdapter.h>
#import <LegacyComponents/TGPhoneUtils.h>
#import <LegacyComponents/TGPhotoAvatarCropView.h>
#import <LegacyComponents/TGPhotoCaptionInputMixin.h>
#import <LegacyComponents/TGPhotoEditorAnimation.h>
#import <LegacyComponents/TGPhotoEditorButton.h>
#import <LegacyComponents/TGPhotoEditorController.h>
#import <LegacyComponents/TGPhotoEditorInterfaceAssets.h>
#import <LegacyComponents/TGPhotoEditorSliderView.h>
#import <LegacyComponents/TGPhotoEditorSparseView.h>
#import <LegacyComponents/TGPhotoEditorTabController.h>
#import <LegacyComponents/TGPhotoEditorToolView.h>
#import <LegacyComponents/TGPhotoEditorUtils.h>
#import <LegacyComponents/TGPhotoMaskPosition.h>
#import <LegacyComponents/TGPhotoPaintEntity.h>
#import <LegacyComponents/TGPhotoPaintEntityView.h>
#import <LegacyComponents/TGPhotoPaintStickerEntity.h>
#import <LegacyComponents/TGPhotoPaintStickersContext.h>
#import <LegacyComponents/TGPhotoPaintTextEntity.h>
#import <LegacyComponents/TGPhotoToolbarView.h>
#import <LegacyComponents/TGPhotoVideoEditor.h>
#import <LegacyComponents/TGPIPAblePlayerView.h>
#import <LegacyComponents/TGPluralization.h>
#import <LegacyComponents/TGProgressSpinnerView.h>
#import <LegacyComponents/TGProgressWindow.h>
#import <LegacyComponents/TGProxyWindow.h>
#import <LegacyComponents/TGRTLScreenEdgePanGestureRecognizer.h>
#import <LegacyComponents/TGReplyMarkupAttachment.h>
#import <LegacyComponents/TGReplyMessageMediaAttachment.h>
#import <LegacyComponents/TGRTLScreenEdgePanGestureRecognizer.h>
#import <LegacyComponents/TGSecretTimerMenu.h>
#import <LegacyComponents/TGStaticBackdropAreaData.h>
#import <LegacyComponents/TGStaticBackdropImageData.h>
#import <LegacyComponents/TGStickerAssociation.h>
@ -244,15 +268,22 @@
#import <LegacyComponents/TGStickerPackReference.h>
#import <LegacyComponents/TGStringUtils.h>
#import <LegacyComponents/TGTextCheckingResult.h>
#import <LegacyComponents/TGTextField.h>
#import <LegacyComponents/TGTimerTarget.h>
#import <LegacyComponents/TGToolbarButton.h>
#import <LegacyComponents/TGTooltipView.h>
#import <LegacyComponents/TGUnsupportedMediaAttachment.h>
#import <LegacyComponents/TGViaUserAttachment.h>
#import <LegacyComponents/TGVideoCameraGLRenderer.h>
#import <LegacyComponents/TGVideoCameraGLView.h>
#import <LegacyComponents/TGVideoCameraMovieRecorder.h>
#import <LegacyComponents/TGVideoEditAdjustments.h>
#import <LegacyComponents/TGVideoInfo.h>
#import <LegacyComponents/TGVideoMediaAttachment.h>
#import <LegacyComponents/TGVideoMessageCaptureController.h>
#import <LegacyComponents/TGVideoMessageControls.h>
#import <LegacyComponents/TGVideoMessageRingView.h>
#import <LegacyComponents/TGVideoMessageScrubber.h>
#import <LegacyComponents/TGViewController+TGRecursiveEnumeration.h>
#import <LegacyComponents/TGViewController.h>
#import <LegacyComponents/TGWeakDelegate.h>
@ -260,7 +291,7 @@
#import <LegacyComponents/TGWebPageMediaAttachment.h>
#import <LegacyComponents/UICollectionView+Utils.h>
#import <LegacyComponents/UIControl+HitTestEdgeInsets.h>
#import <LegacyComponents/UIDevice+PlatformInfo.h>
#import <LegacyComponents/UIImage+TG.h>
#import <LegacyComponents/UIImage+TGMediaEditableItem.h>
#import <LegacyComponents/UIScrollView+TGHacks.h>
#import <LegacyComponents/lmdb.h>

View File

@ -1,4 +1,4 @@
#import "TGMediaAttachment.h"
#import <LegacyComponents/TGMediaAttachment.h>
#import <LegacyComponents/TGWebDocument.h>

View File

@ -1,4 +1,4 @@
#import "TGMediaAttachment.h"
#import <LegacyComponents/TGMediaAttachment.h>
#import <LegacyComponents/TGMessageEntityUrl.h>
#import <LegacyComponents/TGMessageEntityEmail.h>

View File

@ -1,5 +1,3 @@
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGOverlayController.h>
#import <LegacyComponents/LegacyComponentsContext.h>

View File

@ -1,4 +1,5 @@
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGViewController.h>
#import <LegacyComponents/LegacyComponentsContext.h>
@class TGPresentation;
@class TGPassportMRZ;

View File

@ -1,10 +1,9 @@
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGMediaEditingContext.h>
#import <LegacyComponents/TGPhotoToolbarView.h>
#import <LegacyComponents/LegacyComponentsContext.h>
#import <LegacyComponents/TGOverlayController.h>
#import <AVFoundation/AVFoundation.h>
@class SSignal;
@class PGCameraShotMetadata;

View File

@ -1,5 +1,5 @@
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGViewController.h>
#import <LegacyComponents/TGMediaEditingContext.h>
#import <LegacyComponents/TGPhotoEditorController.h>
@protocol TGMediaEditAdjustments;

View File

@ -1,4 +1,11 @@
#import <LegacyComponents/LegacyComponents.h>
#import <UIKit/UIKit.h>
#import <LegacyComponents/TGPhotoPaintStickersContext.h>
#import <LegacyComponents/LegacyComponentsContext.h>
#import <LegacyComponents/TGViewController.h>
#import <LegacyComponents/TGVideoEditAdjustments.h>
#import <LegacyComponents/TGMediaEditingContext.h>
#import <LegacyComponents/TGMediaSelectionContext.h>
@interface TGPhotoVideoEditor : NSObject

View File

@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/PSCoding.h>
#import <LegacyComponents/TGStickerPackReference.h>
@interface TGStickerPack : NSObject <NSCoding, PSCoding>

View File

@ -1,4 +1,8 @@
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGViewController.h>
#import <LegacyComponents/TGOverlayController.h>
#import <LegacyComponents/LegacyComponentsContext.h>
#import <LegacyComponents/TGVideoMessageCaptureController.h>
#import <LegacyComponents/TGLiveUploadInterface.h>
@class TGVideoEditAdjustments;
@class TGModernConversationInputMicPallete;

View File

@ -1,6 +1,6 @@
#import "ASActor.h"
#import <LegacyComponents/ASActor.h>
#import "ActionStage.h"
#import <LegacyComponents/ActionStage.h>
#import "LegacyComponentsInternal.h"

View File

@ -1,8 +1,8 @@
#import "ASHandle.h"
#import <LegacyComponents/ASHandle.h>
#import <LegacyComponents/LegacyComponents.h>
#import "ASWatcher.h"
#import <LegacyComponents/ASWatcher.h>
@interface ASHandle ()
{

View File

@ -1,6 +1,6 @@
#import "ASQueue.h"
#import <LegacyComponents/ASQueue.h>
@interface ASQueue ()
{

View File

@ -1,4 +1,4 @@
#import "AVURLAsset+TGMediaItem.h"
#import <LegacyComponents/AVURLAsset+TGMediaItem.h>
#import <LegacyComponents/TGMediaAssetImageSignals.h>
#import <LegacyComponents/TGPhotoEditorUtils.h>

View File

@ -1,10 +1,10 @@
#import "ActionStage.h"
#import <LegacyComponents/ActionStage.h>
#import <SSignalKit/SSignalKit.h>
#import "LegacyComponentsInternal.h"
#import "ASActor.h"
#import <LegacyComponents/ASActor.h>
#import <os/lock.h>

View File

@ -1,4 +1,4 @@
#import "Freedom.h"
#import <LegacyComponents/Freedom.h>
#import <objc/runtime.h>
#import <objc/message.h>

View File

@ -1,13 +1,13 @@
#import "FreedomUIKit.h"
#import <LegacyComponents/FreedomUIKit.h>
#import "LegacyComponentsInternal.h"
#import "Freedom.h"
#import <LegacyComponents/Freedom.h>
#import <objc/runtime.h>
#import <objc/message.h>
#import "TGHacks.h"
#import "TGNavigationController.h"
#import <LegacyComponents/TGHacks.h>
#import <LegacyComponents/TGNavigationController.h>
#define DEBUG_KEYBOARD_QUEUE false

View File

@ -5,6 +5,10 @@
#import "LegacyComponentsInternal.h"
#import "GLProgram.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// START:typedefs
#pragma mark Function Pointer Definitions
typedef void (*GLInfoFunction)(GLuint program,
@ -272,3 +276,5 @@ typedef void (*GLLogFunction) (GLuint program,
}
// END:dealloc
@end
#pragma clang diagnostic pop

View File

@ -10,7 +10,12 @@ typedef enum { kGPUImageNoRotation, kGPUImageRotateLeft, kGPUImageRotateRight, k
@property(readonly, nonatomic) dispatch_queue_t contextQueue;
@property(readwrite, retain, nonatomic) GLProgram *currentShaderProgram;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@property(readonly, retain, nonatomic) EAGLContext *context;
#pragma clang diagnostic pop
@property(readonly, nonatomic) CVOpenGLESTextureCacheRef coreVideoTextureCache;
@property(readonly, nonatomic) GPUImageFramebufferCache *framebufferCache;
@ -33,7 +38,10 @@ typedef enum { kGPUImageNoRotation, kGPUImageRotateLeft, kGPUImageRotateRight, k
- (void)presentBufferForDisplay;
- (GLProgram *)programForVertexShaderString:(NSString *)vertexShaderString fragmentShaderString:(NSString *)fragmentShaderString;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (void)useSharegroup:(EAGLSharegroup *)sharegroup;
#pragma clang diagnostic pop
// Manage fast texture upload
+ (BOOL)supportsFastTextureUpload;

View File

@ -2,6 +2,9 @@
#import <OpenGLES/EAGLDrawable.h>
#import <AVFoundation/AVFoundation.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#define MAXSHADERPROGRAMSALLOWEDINCACHE 40
@interface GPUImageContext()
@ -311,3 +314,5 @@ static void *openGLESContextQueueKey;
}
@end
#pragma clang diagnostic pop

View File

@ -3,6 +3,9 @@
#import "LegacyComponentsInternal.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// Hardcode the vertex shader for standard filters, but this can be overridden
NSString *const kGPUImageVertexShaderString = SHADER_STRING
(
@ -782,3 +785,5 @@ NSString *const kGPUImagePassthroughFragmentShaderString = SHADER_STRING
}
@end
#pragma clang diagnostic pop

View File

@ -1,6 +1,9 @@
#import "GPUImageFramebuffer.h"
#import "GPUImageOutput.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface GPUImageFramebuffer()
{
GLuint framebuffer;
@ -493,3 +496,5 @@ void dataProviderUnlockCallback (void *info, __unused const void *data, __unused
}
@end
#pragma clang diagnostic pop

View File

@ -168,7 +168,10 @@
[framebufferCache removeAllObjects];
[framebufferTypeCounts removeAllObjects];
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CVOpenGLESTextureCacheFlush([[GPUImageContext sharedImageProcessingContext] coreVideoTextureCache], 0);
#pragma clang diagnostic pop
#else
#endif
});

View File

@ -1,5 +1,8 @@
#import "GPUImageGaussianBlurFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@implementation GPUImageGaussianBlurFilter
@synthesize texelSpacingMultiplier = _texelSpacingMultiplier;
@ -483,3 +486,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageSharpenFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *const kGPUImageSharpenVertexShaderString = SHADER_STRING
(
attribute vec4 position;
@ -118,3 +121,4 @@ NSString *const kGPUImageSharpenFragmentShaderString = SHADER_STRING
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageTextureInput.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@implementation GPUImageTextureInput
{
CIContext *ciContext;
@ -141,3 +144,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,7 @@
#import "GPUImageThreeInputFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *const kGPUImageThreeInputTextureVertexShaderString = SHADER_STRING
(
@ -326,3 +328,5 @@ NSString *const kGPUImageThreeInputTextureVertexShaderString = SHADER_STRING
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageToneCurveFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma mark -
#pragma mark GPUImageToneCurveFilter Implementation
@ -454,3 +457,5 @@ NSString *const kGPUImageToneCurveFragmentShaderString = SHADER_STRING
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageTwoInputFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING
(
attribute vec4 position;
@ -213,8 +216,6 @@ NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING
return;
}
BOOL updatedMovieFrameOppositeStillImage = NO;
if (textureIndex == 0)
{
hasReceivedFirstFrame = YES;
@ -228,7 +229,6 @@ NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING
{
if CMTIME_IS_INDEFINITE(secondFrameTime)
{
updatedMovieFrameOppositeStillImage = YES;
}
}
}
@ -245,7 +245,6 @@ NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING
{
if CMTIME_IS_INDEFINITE(firstFrameTime)
{
updatedMovieFrameOppositeStillImage = YES;
}
}
}
@ -261,3 +260,5 @@ NSString *const kGPUImageTwoInputTextureVertexShaderString = SHADER_STRING
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageTwoPassFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@implementation GPUImageTwoPassFilter
#pragma mark -
@ -199,3 +202,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "GPUImageTwoPassTextureSamplingFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@implementation GPUImageTwoPassTextureSamplingFilter
@synthesize verticalTexelSpacing = _verticalTexelSpacing;
@ -83,3 +86,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,7 +1,7 @@
#import "JNWSpringAnimation.h"
#import <LegacyComponents/JNWSpringAnimation.h>
#import "NSValue+JNWAdditions.h"
#import "TGHacks.h"
#import <LegacyComponents/TGHacks.h>
static const CGFloat JNWSpringAnimationDefaultMass = 5.f;
static const CGFloat JNWSpringAnimationDefaultDamping = 30.f;

View File

@ -1,4 +1,4 @@
#import "LegacyComponentsContext.h"
#import <LegacyComponents/LegacyComponentsContext.h>
@implementation LegacyComponentsActionSheetAction

View File

@ -2,7 +2,7 @@
#import "LegacyComponentsInternal.h"
#import "TGLocalization.h"
#import <LegacyComponents/TGLocalization.h>
static id<LegacyComponentsGlobalsProvider> _provider;

View File

@ -1,4 +1,4 @@
#import "LegacyComponentsGlobals.h"
#import <LegacyComponents/LegacyComponentsGlobals.h>
@class TGLocalization;

View File

@ -1,6 +1,6 @@
#import "LegacyComponentsInternal.h"
#import "TGLocalization.h"
#import <LegacyComponents/TGLocalization.h>
#import <UIKit/UIKit.h>

View File

@ -1,4 +1,4 @@
#import "NSInputStream+TL.h"
#import <LegacyComponents/NSInputStream+TL.h>
#import "LegacyComponentsInternal.h"

View File

@ -1,4 +1,4 @@
#import "NSObject+TGLock.h"
#import <LegacyComponents/NSObject+TGLock.h>
#import <objc/runtime.h>

View File

@ -1,14 +1,14 @@
#import "PGCamera.h"
#import <LegacyComponents/PGCamera.h>
#import "LegacyComponentsInternal.h"
#import "PGCameraCaptureSession.h"
#import "PGCameraMovieWriter.h"
#import "PGCameraDeviceAngleSampler.h"
#import <LegacyComponents/PGCameraCaptureSession.h>
#import <LegacyComponents/PGCameraMovieWriter.h>
#import <LegacyComponents/PGCameraDeviceAngleSampler.h>
#import <SSignalKit/SSignalKit.h>
#import "TGCameraPreviewView.h"
#import <LegacyComponents/TGCameraPreviewView.h>
NSString *const PGCameraFlashActiveKey = @"flashActive";
NSString *const PGCameraFlashAvailableKey = @"flashAvailable";
@ -683,8 +683,11 @@ NSString *const PGCameraAdjustingFocusKey = @"adjustingFocus";
- (PGCameraPosition)togglePosition
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo].count < 2 || self.disabled)
return self.captureSession.currentCameraPosition;
#pragma clang diagnostic pop
[self _unsubscribeFromCameraChanges];

View File

@ -1,5 +1,5 @@
#import "PGCameraCaptureSession.h"
#import "PGCameraMovieWriter.h"
#import <LegacyComponents/PGCameraCaptureSession.h>
#import <LegacyComponents/PGCameraMovieWriter.h>
#import "PGRectangleDetector.h"
#import <LegacyComponents/LegacyComponentsGlobals.h>
@ -15,7 +15,10 @@
#import <AVFoundation/AVFoundation.h>
#import <SSignalKit/SSignalKit.h>
#import "POPSpringAnimation.h"
#import <LegacyComponents/POPSpringAnimation.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
const NSInteger PGCameraFrameRate = 30;
@ -319,13 +322,11 @@ const NSInteger PGCameraFrameRate = 30;
- (void)switchToBestVideoFormatForDevice:(AVCaptureDevice *)device
{
bool preferZoomableFormat = [self hasTelephotoCamera] || [self hasUltrawideCamera];
[self _reconfigureDevice:device withBlock:^(AVCaptureDevice *device)
{
NSArray *availableFormats = device.formats;
AVCaptureDeviceFormat *preferredFormat = nil;
NSMutableArray *maybeFormats = nil;
bool hasSecondaryZoomLevels = false;
int32_t maxWidth = 0;
int32_t maxHeight = 0;
for (AVCaptureDeviceFormat *format in availableFormats)
@ -337,7 +338,6 @@ const NSInteger PGCameraFrameRate = 30;
if (dimensions.width >= maxWidth && dimensions.width <= 1920 && dimensions.height >= maxHeight && dimensions.height <= 1080)
{
if (dimensions.width > maxWidth) {
hasSecondaryZoomLevels = false;
maybeFormats = [[NSMutableArray alloc] init];
}
FourCharCode mediaSubType = CMFormatDescriptionGetMediaSubType(format.formatDescription);
@ -357,10 +357,13 @@ const NSInteger PGCameraFrameRate = 30;
}
if (supportedRate) {
if (iosMajorVersion() >= 16 && format.secondaryNativeResolutionZoomFactors.count > 0) {
hasSecondaryZoomLevels = true;
if (@available(iOS 16.0, *)) {
if (format.secondaryNativeResolutionZoomFactors.count > 0) {
[maybeFormats addObject:format];
} else if (!hasSecondaryZoomLevels) {
} else {
[maybeFormats addObject:format];
}
} else {
[maybeFormats addObject:format];
}
}
@ -1156,3 +1159,5 @@ static UIImageOrientation TGSnapshotOrientationForVideoOrientation(bool mirrored
}
@end
#pragma clang diagnostic pop

View File

@ -1,4 +1,4 @@
#import "PGCameraDeviceAngleSampler.h"
#import <LegacyComponents/PGCameraDeviceAngleSampler.h>
#import <CoreMotion/CoreMotion.h>

View File

@ -1,4 +1,4 @@
#import "PGCameraMovieWriter.h"
#import <LegacyComponents/PGCameraMovieWriter.h>
#import "LegacyComponentsInternal.h"

View File

@ -1,4 +1,4 @@
#import "PGCameraShotMetadata.h"
#import <LegacyComponents/PGCameraShotMetadata.h>
@implementation PGCameraShotMetadata

View File

@ -1,9 +1,9 @@
#import "PGCameraVolumeButtonHandler.h"
#import <LegacyComponents/PGCameraVolumeButtonHandler.h>
#import "LegacyComponentsInternal.h"
#import "TGStringUtils.h"
#import "Freedom.h"
#import <LegacyComponents/TGStringUtils.h>
#import <LegacyComponents/Freedom.h>
#import <AVKit/AVKit.h>

View File

@ -4,6 +4,9 @@
#import "LegacyComponentsInternal.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *const PGPhotoFilterDefinitionsShaderString = PGShaderString
(
precision highp float;
@ -422,3 +425,5 @@ NSString *const PGPhotoFilterMainShaderString = PGShaderString
}
@end
#pragma clang diagnostic pop

View File

@ -5,6 +5,9 @@
#import "GLProgram.h"
#import "GPUImageFilter.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface PGPhotoEditorRawDataOutput ()
{
GPUImageFramebuffer *firstInputFramebuffer, *outputFramebuffer, *retainedFramebuffer;
@ -286,3 +289,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,7 +1,7 @@
#import "PGPhotoEditorValues.h"
#import "TGPaintingData.h"
#import <LegacyComponents/PGPhotoEditorValues.h>
#import <LegacyComponents/TGPaintingData.h>
#import "TGPhotoEditorUtils.h"
#import <LegacyComponents/TGPhotoEditorUtils.h>
@implementation PGPhotoEditorValues

View File

@ -7,6 +7,9 @@
#import <QuartzCore/QuartzCore.h>
#import <AVFoundation/AVFoundation.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface PGPhotoEditorView ()
{
GPUImageRotationMode inputRotation;
@ -416,3 +419,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -4,6 +4,9 @@
#import "PGPhotoProcessPass.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
const NSUInteger PGPhotoEnhanceHistogramBins = 256;
const NSUInteger PGPhotoEnhanceSegments = 4;
@ -332,3 +335,5 @@ const NSUInteger PGPhotoEnhanceSegments = 4;
}
@end
#pragma clang diagnostic pop

View File

@ -2,6 +2,9 @@
#import "PGPhotoProcessPass.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@interface PGPhotoGaussianBlurFilter ()
{
GPUImageFramebuffer *_secondOutputFramebuffer;
@ -496,3 +499,5 @@
}
@end
#pragma clang diagnostic pop

View File

@ -1,5 +1,8 @@
#import "PGPhotoSharpenPass.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSString *const kSharpenVertexShaderString = PGShaderString
(
attribute vec4 position;
@ -142,3 +145,5 @@ NSString *const kSharpenFragmentShaderString = SHADER_STRING
}
@end
#pragma clang diagnostic pop

View File

@ -2,6 +2,9 @@
#import "GPUImageFilter.h"
#import "LegacyComponentsInternal.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
GLfloat kColorConversion601Default[] = {
1.164, 1.164, 1.164,
0.0, -0.392, 2.017,
@ -517,3 +520,5 @@ NSString *const kYUVVideoRangeConversionForLAFragmentShaderString = SHADER_STRIN
}
@end
#pragma clang diagnostic pop

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPAnimatableProperty.h"
#import <LegacyComponents/POPAnimatableProperty.h>
#import "POPCGUtils.h"
#import "POPAnimationRuntime.h"

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPAnimationEvent.h"
#import <LegacyComponents/POPAnimationEvent.h>
#import "POPAnimationEventInternal.h"
static NSString *stringFromType(POPAnimationEventType aType)

View File

@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import "POPAnimationEvent.h"
#import <LegacyComponents/POPAnimationEvent.h>
@interface POPAnimationEvent ()

View File

@ -10,7 +10,7 @@
#import <QuartzCore/CAAnimation.h>
#import "POPDefines.h"
#import "POPSpringAnimation.h"
#import <LegacyComponents/POPSpringAnimation.h>
/**
@abstract The current drag coefficient.

View File

@ -9,7 +9,7 @@
#import <QuartzCore/CAMediaTimingFunction.h>
#import "POPAnimation.h"
#import <LegacyComponents/POPAnimation.h>
#import "POPAnimationRuntime.h"
#import "POPAnimationTracerInternal.h"
#import "POPSpringSolver.h"

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPAnimation.h"
#import <LegacyComponents/POPAnimation.h>
#define POP_ANIMATION_FRICTION_FOR_QC_FRICTION(qcFriction) (25.0 + (((qcFriction - 8.0) / 2.0) * (25.0 - 19.0)))
#define POP_ANIMATION_TENSION_FOR_QC_TENSION(qcTension) (194.0 + (((qcTension - 30.0) / 50.0) * (375.0 - 194.0)))

View File

@ -20,7 +20,7 @@
#import "POPVector.h"
#import "POPAnimationRuntime.h"
#import "POPCGUtils.h"
#import "POPGeometry.h"
#import <LegacyComponents/POPGeometry.h>
static Boolean pointerEqual(const void *ptr1, const void *ptr2) {
return ptr1 == ptr2;

View File

@ -7,13 +7,13 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPAnimationTracer.h"
#import <LegacyComponents/POPAnimationTracer.h>
#import <QuartzCore/QuartzCore.h>
#import "POPAnimationEventInternal.h"
#import "POPAnimationInternal.h"
#import "POPSpringAnimation.h"
#import <LegacyComponents/POPSpringAnimation.h>
@implementation POPAnimationTracer
{

View File

@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import "POPAnimationTracer.h"
#import <LegacyComponents/POPAnimationTracer.h>
@interface POPAnimationTracer (Internal)

View File

@ -16,10 +16,10 @@
#import <QuartzCore/QuartzCore.h>
#import "POPAnimation.h"
#import <LegacyComponents/POPAnimation.h>
#import "POPAnimationExtras.h"
#import "POPBasicAnimationInternal.h"
#import "POPDecayAnimation.h"
#import <LegacyComponents/POPDecayAnimation.h>
#import <os/lock.h>

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPBasicAnimation.h"
#import <LegacyComponents/POPBasicAnimation.h>
#import "POPPropertyAnimationInternal.h"
// default animation duration

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPCustomAnimation.h"
#import <LegacyComponents/POPCustomAnimation.h>
#import "POPAnimationInternal.h"
@interface POPCustomAnimation ()

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPDecayAnimation.h"
#import <LegacyComponents/POPDecayAnimation.h>
#import "POPPropertyAnimationInternal.h"
// minimal velocity factor before decay animation is considered complete, in units / s

View File

@ -7,7 +7,7 @@
of patent rights can be found in the PATENTS file in the same directory.
*/
#import "POPGeometry.h"
#import <LegacyComponents/POPGeometry.h>
#if !TARGET_OS_IPHONE
@implementation NSValue (POP)

View File

@ -8,7 +8,7 @@
*/
#import "POPAnimationInternal.h"
#import "POPPropertyAnimation.h"
#import <LegacyComponents/POPPropertyAnimation.h>
static void clampValue(CGFloat &value, CGFloat fromValue, CGFloat toValue, NSUInteger clamp)
{

View File

@ -1,4 +1,4 @@
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
#import <pthread.h>

View File

@ -1,4 +1,4 @@
#import "PSKeyValueDecoder.h"
#import <LegacyComponents/PSKeyValueDecoder.h>
#import <objc/runtime.h>

View File

@ -1,4 +1,4 @@
#import "PSKeyValueEncoder.h"
#import <LegacyComponents/PSKeyValueEncoder.h>
#import <objc/runtime.h>

View File

@ -1,8 +1,8 @@
#import "PSLMDBKeyValueCursor.h"
#import <LegacyComponents/PSLMDBKeyValueCursor.h>
#import "LegacyComponentsInternal.h"
#import "PSLMDBTable.h"
#import <LegacyComponents/PSLMDBTable.h>
@interface PSLMDBKeyValueCursor ()
{

View File

@ -1,9 +1,9 @@
#import "PSLMDBKeyValueReaderWriter.h"
#import <LegacyComponents/PSLMDBKeyValueReaderWriter.h>
#import "LegacyComponentsInternal.h"
#import "PSLMDBTable.h"
#import "PSLMDBKeyValueCursor.h"
#import <LegacyComponents/PSLMDBTable.h>
#import <LegacyComponents/PSLMDBKeyValueCursor.h>
@interface PSLMDBKeyValueReaderWriter ()
{

View File

@ -1,11 +1,11 @@
#import "PSLMDBKeyValueStore.h"
#import <LegacyComponents/PSLMDBKeyValueStore.h>
#import "LegacyComponentsInternal.h"
#import "lmdb.h"
#import <LegacyComponents/lmdb.h>
#import "PSLMDBTable.h"
#import "PSLMDBKeyValueReaderWriter.h"
#import <LegacyComponents/PSLMDBTable.h>
#import <LegacyComponents/PSLMDBKeyValueReaderWriter.h>
@interface PSLMDBKeyValueStore ()
{

View File

@ -1,4 +1,4 @@
#import "PSLMDBTable.h"
#import <LegacyComponents/PSLMDBTable.h>
@implementation PSLMDBTable

View File

@ -1,4 +1,4 @@
#import "RMPhoneFormat.h"
#import <LegacyComponents/RMPhoneFormat.h>
@interface PhoneRule : NSObject

View File

@ -1,4 +1,4 @@
#import "SGraphListNode.h"
#import <LegacyComponents/SGraphListNode.h>
@implementation SGraphListNode

View File

@ -1,4 +1,4 @@
#import "SGraphNode.h"
#import <LegacyComponents/SGraphNode.h>
@implementation SGraphNode

View File

@ -1,4 +1,4 @@
#import "SGraphObjectNode.h"
#import <LegacyComponents/SGraphObjectNode.h>
@implementation SGraphObjectNode

View File

@ -1,6 +1,6 @@
#import "TGActionMediaAttachment.h"
#import <LegacyComponents/TGActionMediaAttachment.h>
#import "TGImageMediaAttachment.h"
#import <LegacyComponents/TGImageMediaAttachment.h>
@implementation TGActionMediaAttachment

View File

@ -1,4 +1,4 @@
#import "TGAnimationBlockDelegate.h"
#import <LegacyComponents/TGAnimationBlockDelegate.h>
@implementation TGAnimationBlockDelegate

View File

@ -1,11 +1,11 @@
#import "TGAttachmentCameraView.h"
#import "TGImageUtils.h"
#import <LegacyComponents/TGAttachmentCameraView.h>
#import <LegacyComponents/TGImageUtils.h>
#import "LegacyComponentsInternal.h"
#import <LegacyComponents/TGMenuSheetView.h>
#import "TGAttachmentMenuCell.h"
#import "TGCameraController.h"
#import <LegacyComponents/TGCameraController.h>
#import <LegacyComponents/PGCamera.h>
#import <LegacyComponents/TGCameraPreviewView.h>
@ -63,7 +63,10 @@
[self setInterfaceOrientation:[[LegacyComponentsGlobals provider] applicationStatusBarOrientation] animated:false];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOrientationChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
#pragma clang diagnostic pop
_fadeView = [[UIView alloc] initWithFrame:self.bounds];
_fadeView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
@ -122,7 +125,10 @@
if (previewView.superview == _wrapperView && _camera != nil)
[self stopPreview];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
#pragma clang diagnostic pop
}
- (void)removeCorners {

View File

@ -1,4 +1,5 @@
#import "TGAttachmentCarouselItemView.h"
#import <LegacyComponents/LegacyComponents.h>
#import <LegacyComponents/TGAttachmentCarouselItemView.h>
#import "LegacyComponentsInternal.h"
@ -13,7 +14,7 @@
#import "TGTransitionLayout.h"
#import "TGAttachmentCameraView.h"
#import <LegacyComponents/TGAttachmentCameraView.h>
#import "TGAttachmentPhotoCell.h"
#import "TGAttachmentVideoCell.h"
@ -28,7 +29,7 @@
#import <LegacyComponents/TGMediaPickerGalleryItem.h>
#import <LegacyComponents/TGMediaAssetsUtils.h>
#import "TGMediaAvatarEditorTransition.h"
#import <LegacyComponents/TGMediaAvatarEditorTransition.h>
#import <LegacyComponents/TGPhotoEditorController.h>
#import <LegacyComponents/TGVideoEditAdjustments.h>
#import <LegacyComponents/TGMediaAsset+TGMediaEditableItem.h>
@ -1333,7 +1334,10 @@ const NSUInteger TGAttachmentDisplayedAssetLimit = 500;
return nil;
CGRect cellFrame = [_collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:indexPath].frame;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
previewingContext.sourceRect = cellFrame;
#pragma clang diagnostic pop
TGMediaAsset *asset = nil;
_previewGalleryMixin = [self galleryMixinForIndexPath:indexPath previewMode:true outAsset:&asset];

View File

@ -1,7 +1,7 @@
#import "TGAttachmentVideoCell.h"
#import "LegacyComponentsInternal.h"
#import "TGFont.h"
#import <LegacyComponents/TGFont.h>
#import <LegacyComponents/TGModernGalleryTransitionView.h>

View File

@ -1,4 +1,4 @@
#import "TGAudioMediaAttachment.h"
#import <LegacyComponents/TGAudioMediaAttachment.h>
@implementation TGAudioMediaAttachment

View File

@ -1,8 +1,8 @@
#import "TGAudioWaveform.h"
#import <LegacyComponents/TGAudioWaveform.h>
#import "LegacyComponentsInternal.h"
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
static int32_t get_bits(uint8_t const *bytes, unsigned int bitOffset, unsigned int numBits)
{

View File

@ -1,8 +1,8 @@
#import "TGAuthorSignatureMediaAttachment.h"
#import <LegacyComponents/TGAuthorSignatureMediaAttachment.h>
#import "LegacyComponentsInternal.h"
#import "NSInputStream+TL.h"
#import <LegacyComponents/NSInputStream+TL.h>
@implementation TGAuthorSignatureMediaAttachment
@ -26,7 +26,7 @@
- (void)serialize:(NSMutableData *)data
{
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self];
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self requiringSecureCoding:false error:nil];
int32_t length = (int32_t)serializedData.length;
[data appendBytes:&length length:4];
[data appendData:serializedData];
@ -36,7 +36,7 @@
{
int32_t length = [is readInt32];
NSData *data = [is readData:length];
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil];
}
- (BOOL)isEqual:(id)object {

View File

@ -1,4 +1,4 @@
#import "TGBackdropView.h"
#import <LegacyComponents/TGBackdropView.h>
#import "LegacyComponentsInternal.h"

View File

@ -1,6 +1,6 @@
#import "TGBotComandInfo.h"
#import <LegacyComponents/TGBotComandInfo.h>
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
@implementation TGBotComandInfo

View File

@ -1,6 +1,6 @@
#import "TGBotContextResultAttachment.h"
#import <LegacyComponents/TGBotContextResultAttachment.h>
#import "NSInputStream+TL.h"
#import <LegacyComponents/NSInputStream+TL.h>
@implementation TGBotContextResultAttachment
@ -28,7 +28,7 @@
- (void)serialize:(NSMutableData *)data
{
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self];
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self requiringSecureCoding:false error:nil];
int32_t length = (int32_t)serializedData.length;
[data appendBytes:&length length:4];
[data appendData:serializedData];
@ -38,7 +38,7 @@
{
int32_t length = [is readInt32];
NSData *data = [is readData:length];
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil];
}
@end

View File

@ -1,6 +1,6 @@
#import "TGBotInfo.h"
#import <LegacyComponents/TGBotInfo.h>
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
@implementation TGBotInfo

View File

@ -1,6 +1,6 @@
#import "TGBotReplyMarkup.h"
#import <LegacyComponents/TGBotReplyMarkup.h>
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
@implementation TGBotReplyMarkup

View File

@ -1,8 +1,8 @@
#import "TGBotReplyMarkupButton.h"
#import <LegacyComponents/TGBotReplyMarkupButton.h>
#import "LegacyComponentsInternal.h"
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
@implementation TGBotReplyMarkupButtonActionUrl

View File

@ -1,6 +1,6 @@
#import "TGBotReplyMarkupRow.h"
#import <LegacyComponents/TGBotReplyMarkupRow.h>
#import "PSKeyValueCoder.h"
#import <LegacyComponents/PSKeyValueCoder.h>
@implementation TGBotReplyMarkupRow

Some files were not shown because too many files have changed in this diff Show More