From 1b2cdb9a9bdbe2fa35ce9fae8924005f1a77108a Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Wed, 18 Jun 2025 17:24:21 +0200 Subject: [PATCH] Cleanup --- submodules/LegacyComponents/BUILD | 3 +- .../LegacyComponents/LegacyComponents.h | 47 +++++++++++++++---- .../TGInvoiceMediaAttachment.h | 2 +- .../TGMessageEntitiesAttachment.h | 2 +- .../TGModernGalleryController.h | 2 - .../TGPassportScanController.h | 3 +- .../TGPhotoEditorController.h | 7 ++- .../TGPhotoEditorTabController.h | 4 +- .../LegacyComponents/TGPhotoVideoEditor.h | 9 +++- .../LegacyComponents/TGStickerPack.h | 3 +- .../TGVideoMessageCaptureController.h | 6 ++- submodules/LegacyComponents/Sources/ASActor.m | 4 +- .../LegacyComponents/Sources/ASHandle.m | 4 +- submodules/LegacyComponents/Sources/ASQueue.m | 2 +- .../Sources/AVURLAsset+TGMediaItem.m | 2 +- .../LegacyComponents/Sources/ActionStage.mm | 4 +- .../LegacyComponents/Sources/Freedom.mm | 2 +- .../LegacyComponents/Sources/FreedomUIKit.m | 8 ++-- .../LegacyComponents/Sources/GLProgram.m | 6 +++ .../Sources/GPUImageContext.h | 8 ++++ .../Sources/GPUImageContext.m | 5 ++ .../LegacyComponents/Sources/GPUImageFilter.m | 5 ++ .../Sources/GPUImageFramebuffer.m | 5 ++ .../Sources/GPUImageFramebufferCache.m | 3 ++ .../Sources/GPUImageGaussianBlurFilter.m | 5 ++ .../Sources/GPUImageSharpenFilter.m | 4 ++ .../Sources/GPUImageTextureInput.m | 5 ++ .../Sources/GPUImageThreeInputFilter.m | 4 ++ .../Sources/GPUImageToneCurveFilter.m | 5 ++ .../Sources/GPUImageTwoInputFilter.m | 9 ++-- .../Sources/GPUImageTwoPassFilter.m | 5 ++ .../GPUImageTwoPassTextureSamplingFilter.m | 5 ++ .../Sources/JNWSpringAnimation.m | 4 +- .../Sources/LegacyComponentsContext.m | 2 +- .../Sources/LegacyComponentsGlobals.m | 2 +- .../Sources/LegacyComponentsInternal.h | 2 +- .../Sources/LegacyComponentsInternal.m | 2 +- .../Sources/NSInputStream+TL.m | 2 +- .../Sources/NSObject+TGLock.m | 2 +- .../LegacyComponents/Sources/PGCamera.m | 13 +++-- .../Sources/PGCameraCaptureSession.m | 25 ++++++---- .../Sources/PGCameraDeviceAngleSampler.m | 2 +- .../Sources/PGCameraMovieWriter.m | 2 +- .../Sources/PGCameraShotMetadata.m | 2 +- .../Sources/PGCameraVolumeButtonHandler.m | 6 +-- .../Sources/PGPhotoCustomFilterPass.m | 5 ++ .../Sources/PGPhotoEditorRawDataOutput.m | 7 ++- .../Sources/PGPhotoEditorValues.m | 6 +-- .../Sources/PGPhotoEditorView.m | 5 ++ .../Sources/PGPhotoEnhanceLUTGenerator.m | 5 ++ .../Sources/PGPhotoGaussianBlurFilter.m | 5 ++ .../Sources/PGPhotoSharpenPass.m | 7 ++- .../LegacyComponents/Sources/PGVideoMovie.m | 5 ++ .../Sources/POPAnimatableProperty.mm | 2 +- .../Sources/POPAnimationEvent.mm | 2 +- .../Sources/POPAnimationEventInternal.h | 2 +- .../Sources/POPAnimationExtras.h | 2 +- .../Sources/POPAnimationInternal.h | 2 +- .../Sources/POPAnimationPrivate.h | 2 +- .../Sources/POPAnimationRuntime.mm | 2 +- .../Sources/POPAnimationTracer.mm | 4 +- .../Sources/POPAnimationTracerInternal.h | 2 +- .../LegacyComponents/Sources/POPAnimator.mm | 4 +- .../Sources/POPBasicAnimationInternal.h | 2 +- .../Sources/POPCustomAnimation.mm | 2 +- .../Sources/POPDecayAnimationInternal.h | 2 +- .../LegacyComponents/Sources/POPGeometry.mm | 2 +- .../Sources/POPPropertyAnimationInternal.h | 2 +- .../Sources/PSKeyValueCoder.m | 2 +- .../Sources/PSKeyValueDecoder.m | 2 +- .../Sources/PSKeyValueEncoder.m | 2 +- .../Sources/PSLMDBKeyValueCursor.m | 4 +- .../Sources/PSLMDBKeyValueReaderWriter.m | 6 +-- .../Sources/PSLMDBKeyValueStore.m | 8 ++-- .../LegacyComponents/Sources/PSLMDBTable.m | 2 +- .../LegacyComponents/Sources/RMPhoneFormat.m | 2 +- .../LegacyComponents/Sources/SGraphListNode.m | 2 +- .../LegacyComponents/Sources/SGraphNode.m | 2 +- .../Sources/SGraphObjectNode.m | 2 +- .../Sources/TGActionMediaAttachment.m | 4 +- .../Sources/TGAnimationBlockDelegate.m | 2 +- .../Sources/TGAttachmentCameraView.m | 12 +++-- .../Sources/TGAttachmentCarouselItemView.m | 10 ++-- .../Sources/TGAttachmentVideoCell.m | 2 +- .../Sources/TGAudioMediaAttachment.m | 2 +- .../Sources/TGAudioWaveform.m | 4 +- .../TGAuthorSignatureMediaAttachment.m | 8 ++-- .../LegacyComponents/Sources/TGBackdropView.m | 2 +- .../Sources/TGBotComandInfo.m | 4 +- .../Sources/TGBotContextResultAttachment.m | 8 ++-- .../LegacyComponents/Sources/TGBotInfo.m | 4 +- .../Sources/TGBotReplyMarkup.m | 4 +- .../Sources/TGBotReplyMarkupButton.m | 4 +- .../Sources/TGBotReplyMarkupRow.m | 4 +- submodules/LegacyComponents/Sources/TGCache.m | 7 ++- .../Sources/TGCameraCapturedPhoto.m | 2 +- .../Sources/TGCameraCapturedVideo.m | 12 ++--- .../Sources/TGCameraController.m | 17 ++++--- .../Sources/TGCameraFlashActiveView.m | 4 +- .../Sources/TGCameraFlashControl.m | 10 ++-- .../Sources/TGCameraFlipButton.m | 6 +-- .../Sources/TGCameraInterfaceAssets.m | 2 +- .../Sources/TGCameraMainPhoneView.m | 26 +++++----- .../Sources/TGCameraMainTabletView.m | 20 ++++---- .../Sources/TGCameraMainView.m | 19 +++++--- .../Sources/TGCameraModeControl.m | 6 +-- .../Sources/TGCameraPreviewView.m | 4 +- .../Sources/TGCameraRectangleView.m | 6 +-- .../Sources/TGCameraShutterButton.m | 6 +-- .../Sources/TGCameraTimeCodeView.m | 2 +- .../Sources/TGCameraToastView.m | 4 +- .../Sources/TGCameraZoomView.m | 10 ++-- .../Sources/TGChannelAdminRights.m | 4 +- .../Sources/TGChannelBannedRights.m | 4 +- .../Sources/TGCheckButtonView.m | 8 ++-- .../Sources/TGContactMediaAttachment.m | 2 +- .../LegacyComponents/Sources/TGConversation.m | 14 +++--- .../LegacyComponents/Sources/TGDataResource.m | 2 +- .../Sources/TGDatabaseMessageDraft.m | 6 +-- .../LegacyComponents/Sources/TGDateUtils.mm | 6 +-- .../Sources/TGDocumentAttributeAnimated.m | 2 +- .../Sources/TGDocumentAttributeAudio.m | 4 +- .../Sources/TGDocumentAttributeFilename.m | 4 +- .../Sources/TGDocumentAttributeImageSize.m | 4 +- .../Sources/TGDocumentAttributeSticker.m | 4 +- .../Sources/TGDocumentAttributeVideo.m | 4 +- .../Sources/TGDocumentMediaAttachment.m | 14 +++--- .../Sources/TGDoubleTapGestureRecognizer.m | 2 +- .../Sources/TGEmbedPIPButton.m | 2 +- .../Sources/TGEmbedPIPPullArrowView.m | 2 +- submodules/LegacyComponents/Sources/TGFont.mm | 4 +- .../TGForwardedMessageMediaAttachment.m | 2 +- .../Sources/TGFullscreenContainerView.m | 2 +- .../Sources/TGGameMediaAttachment.m | 10 ++-- .../LegacyComponents/Sources/TGGifConverter.m | 4 +- submodules/LegacyComponents/Sources/TGHacks.m | 10 ++-- .../Sources/TGIconSwitchView.m | 2 +- .../LegacyComponents/Sources/TGImageBlur.m | 12 ++--- .../Sources/TGImageDataSource.m | 2 +- .../LegacyComponents/Sources/TGImageInfo.mm | 2 +- .../Sources/TGImageLuminanceMap.m | 2 +- .../LegacyComponents/Sources/TGImageManager.m | 4 +- .../Sources/TGImageManagerTask.m | 2 +- .../Sources/TGImageMediaAttachment.m | 16 +++++-- .../LegacyComponents/Sources/TGImageUtils.mm | 7 ++- .../LegacyComponents/Sources/TGImageView.m | 2 +- .../LegacyComponents/Sources/TGInstantPage.m | 8 ++-- .../Sources/TGInvoiceMediaAttachment.m | 10 ++-- .../LegacyComponents/Sources/TGKeyCommand.m | 7 ++- .../Sources/TGKeyCommandController.m | 6 +-- submodules/LegacyComponents/Sources/TGLabel.m | 2 +- .../Sources/TGListsTableView.m | 6 +-- .../TGLocalMessageMetaMediaAttachment.m | 4 +- .../LegacyComponents/Sources/TGLocalization.m | 4 +- .../Sources/TGLocationMediaAttachment.m | 7 ++- .../TGMediaAsset+TGMediaEditableItem.m | 2 +- .../LegacyComponents/Sources/TGMediaAsset.m | 4 +- .../Sources/TGMediaAssetFetchResult.m | 4 +- .../Sources/TGMediaAssetFetchResultChange.m | 2 +- .../Sources/TGMediaAssetGroup.m | 2 +- .../Sources/TGMediaAssetImageSignals.m | 6 +-- .../Sources/TGMediaAssetModernImageSignals.m | 14 ++++-- .../Sources/TGMediaAssetMoment.m | 4 +- .../Sources/TGMediaAssetMomentList.m | 4 +- .../Sources/TGMediaAssetsController.m | 5 +- .../Sources/TGMediaAssetsGifCell.m | 2 +- .../Sources/TGMediaAssetsLibrary.m | 4 +- .../Sources/TGMediaAssetsModernLibrary.m | 6 +-- .../Sources/TGMediaAssetsPickerController.m | 12 ++--- .../Sources/TGMediaAssetsUtils.m | 4 +- .../Sources/TGMediaAssetsVideoCell.m | 2 +- .../Sources/TGMediaAttachment.m | 2 +- .../Sources/TGMediaAvatarEditorTransition.m | 2 +- .../Sources/TGMediaAvatarMenuMixin.m | 8 ++-- .../Sources/TGMediaEditingContext.m | 18 +++---- .../Sources/TGMediaGroupCell.m | 4 +- .../Sources/TGMediaOriginInfo.m | 6 +-- .../Sources/TGMediaPickerCell.m | 2 +- .../Sources/TGMediaPickerController.m | 11 +++-- .../TGMediaPickerGalleryInterfaceView.m | 23 ++++----- .../Sources/TGMediaPickerGalleryItem.m | 2 +- .../Sources/TGMediaPickerGalleryModel.m | 21 +++++---- .../Sources/TGMediaPickerGalleryPhotoItem.m | 4 +- .../TGMediaPickerGalleryPhotoItemView.h | 4 +- .../TGMediaPickerGalleryPhotoItemView.m | 7 +-- .../TGMediaPickerGallerySelectedItemsModel.m | 2 +- .../Sources/TGMediaPickerGalleryVideoItem.m | 10 ++-- .../TGMediaPickerGalleryVideoItemView.m | 17 +++---- .../TGMediaPickerGalleryVideoScrubber.m | 6 +-- .../TGMediaPickerGalleryVideoTrimView.m | 2 +- .../Sources/TGMediaPickerLayoutMetrics.m | 2 +- .../Sources/TGMediaPickerModernGalleryMixin.m | 12 ++--- .../Sources/TGMediaPickerPhotoCounterButton.m | 10 ++-- .../Sources/TGMediaPickerPhotoStripCell.m | 12 ++--- .../Sources/TGMediaPickerPhotoStripView.m | 10 ++-- .../TGMediaPickerSendActionSheetController.m | 10 ++-- .../Sources/TGMediaPickerToolbarView.m | 8 ++-- .../Sources/TGMediaSelectionContext.m | 2 +- .../Sources/TGMediaVideoConverter.m | 24 ++++++---- .../Sources/TGMemoryImageCache.m | 2 +- .../Sources/TGMenuSheetButtonItemView.m | 8 ++-- .../Sources/TGMenuSheetCollectionView.m | 2 +- .../Sources/TGMenuSheetController.m | 28 ++++------- .../Sources/TGMenuSheetDimView.m | 2 +- .../Sources/TGMenuSheetItemView.m | 2 +- .../Sources/TGMenuSheetTitleItemView.m | 6 +-- .../Sources/TGMenuSheetView.m | 8 ++-- .../LegacyComponents/Sources/TGMenuView.m | 10 ++-- .../LegacyComponents/Sources/TGMessage.mm | 16 +++---- .../Sources/TGMessageEntitiesAttachment.m | 12 ++--- .../Sources/TGMessageEntity.m | 4 +- .../Sources/TGMessageEntityBold.m | 2 +- .../Sources/TGMessageEntityBotCommand.m | 2 +- .../Sources/TGMessageEntityCashtag.m | 2 +- .../Sources/TGMessageEntityCode.m | 2 +- .../Sources/TGMessageEntityEmail.m | 2 +- .../Sources/TGMessageEntityHashtag.m | 2 +- .../Sources/TGMessageEntityItalic.m | 2 +- .../Sources/TGMessageEntityMention.m | 2 +- .../Sources/TGMessageEntityMentionName.m | 4 +- .../Sources/TGMessageEntityPhone.m | 2 +- .../Sources/TGMessageEntityPre.m | 4 +- .../Sources/TGMessageEntityTextUrl.m | 4 +- .../Sources/TGMessageEntityUrl.m | 2 +- .../LegacyComponents/Sources/TGMessageGroup.m | 2 +- .../LegacyComponents/Sources/TGMessageHole.m | 2 +- .../Sources/TGMessageImageViewOverlayView.m | 16 +++---- .../TGMessageViewCountContentProperty.m | 4 +- .../Sources/TGModernBackToolbarButton.m | 2 +- .../Sources/TGModernBarButton.m | 2 +- .../LegacyComponents/Sources/TGModernButton.m | 2 +- .../LegacyComponents/Sources/TGModernCache.m | 6 +-- .../TGModernConversationInputMicButton.m | 8 ++-- ...ModernConversationTitleActivityIndicator.m | 6 +-- .../Sources/TGModernGalleryContainerView.m | 2 +- .../Sources/TGModernGalleryController.m | 7 +-- .../TGModernGalleryDefaultInterfaceView.m | 16 +++---- .../Sources/TGModernGalleryImageItem.m | 4 +- .../TGModernGalleryImageItemContainerView.m | 2 +- .../TGModernGalleryImageItemImageView.m | 2 +- .../Sources/TGModernGalleryImageItemView.m | 6 +-- .../Sources/TGModernGalleryItemView.m | 10 ++-- .../Sources/TGModernGalleryModel.m | 2 +- .../Sources/TGModernGalleryScrollView.m | 2 +- .../Sources/TGModernGalleryTransitionView.m | 2 +- .../Sources/TGModernGalleryVideoView.m | 2 +- .../Sources/TGModernGalleryView.m | 6 +-- .../Sources/TGModernGalleryZoomableItemView.m | 4 +- .../TGModernGalleryZoomableScrollView.m | 4 +- ...ZoomableScrollViewSwipeGestureRecognizer.m | 2 +- .../Sources/TGModernToolbarButton.m | 2 +- .../Sources/TGNavigationBar.m | 19 ++++---- .../Sources/TGNavigationController.m | 17 ++++--- .../Sources/TGObserverProxy.m | 2 +- .../Sources/TGOverlayController.m | 4 +- .../Sources/TGOverlayControllerWindow.m | 8 ++-- .../Sources/TGOverlayFormsheetWindow.m | 2 +- .../Sources/TGPaintFaceDetector.m | 4 +- .../LegacyComponents/Sources/TGPaintShader.m | 7 ++- .../LegacyComponents/Sources/TGPaintUtils.m | 7 ++- .../LegacyComponents/Sources/TGPaintingData.m | 8 ++-- .../Sources/TGPassportAttachMenu.m | 11 +++-- .../Sources/TGPassportICloud.m | 2 +- .../LegacyComponents/Sources/TGPassportMRZ.m | 2 +- .../LegacyComponents/Sources/TGPassportOCR.mm | 4 +- .../Sources/TGPassportScanController.m | 3 +- .../Sources/TGPassportScanView.m | 8 ++-- .../LegacyComponents/Sources/TGPhoneUtils.m | 4 +- .../Sources/TGPhotoAvatarCropView.m | 4 +- .../Sources/TGPhotoAvatarPreviewController.m | 11 +++-- .../Sources/TGPhotoCaptionInputMixin.m | 4 +- .../Sources/TGPhotoCropController.h | 2 +- .../Sources/TGPhotoCropController.m | 10 ++-- .../Sources/TGPhotoCropGridView.m | 2 +- .../Sources/TGPhotoCropRotationView.m | 2 +- .../Sources/TGPhotoCropView.m | 2 +- .../Sources/TGPhotoDrawingController.h | 2 +- .../Sources/TGPhotoDrawingController.m | 5 +- .../Sources/TGPhotoEditorBlurAreaView.h | 2 +- .../Sources/TGPhotoEditorBlurToolView.h | 2 +- .../Sources/TGPhotoEditorBlurToolView.m | 8 ++-- .../Sources/TGPhotoEditorBlurTypeButton.m | 2 +- .../Sources/TGPhotoEditorButton.m | 4 +- .../Sources/TGPhotoEditorCollectionView.m | 2 +- .../Sources/TGPhotoEditorController.m | 17 +++---- .../TGPhotoEditorCurvesHistogramView.h | 2 +- .../TGPhotoEditorCurvesHistogramView.m | 5 +- .../Sources/TGPhotoEditorCurvesToolView.h | 2 +- .../Sources/TGPhotoEditorCurvesToolView.m | 4 +- .../Sources/TGPhotoEditorGenericToolView.h | 2 +- .../Sources/TGPhotoEditorGenericToolView.m | 4 +- .../Sources/TGPhotoEditorHUDView.m | 4 +- .../Sources/TGPhotoEditorInterfaceAssets.m | 8 ++-- .../Sources/TGPhotoEditorSliderView.m | 4 +- .../Sources/TGPhotoEditorSparseView.m | 2 +- .../Sources/TGPhotoEditorTabController.m | 6 +-- .../Sources/TGPhotoEditorTintSwatchView.m | 2 +- .../Sources/TGPhotoEditorTintToolView.h | 2 +- .../Sources/TGPhotoEditorTintToolView.m | 6 +-- .../Sources/TGPhotoEditorToolButtonsView.m | 8 ++-- .../Sources/TGPhotoEditorUtils.m | 4 +- .../Sources/TGPhotoMaskPosition.m | 4 +- .../Sources/TGPhotoQualityController.h | 2 +- .../Sources/TGPhotoQualityController.m | 7 +-- .../Sources/TGPhotoRectangleCropController.h | 2 +- .../Sources/TGPhotoToolCell.m | 2 +- .../Sources/TGPhotoToolbarView.m | 16 +++---- .../Sources/TGPhotoToolsController.m | 10 ++-- .../Sources/TGPhotoVideoEditor.m | 15 +++--- .../Sources/TGPluralization.m | 2 +- .../Sources/TGProgressSpinnerView.m | 2 +- .../Sources/TGProgressWindow.m | 4 +- .../LegacyComponents/Sources/TGProxyWindow.m | 4 +- .../TGRTLScreenEdgePanGestureRecognizer.m | 4 +- .../Sources/TGReplyMarkupAttachment.m | 12 ++--- .../Sources/TGReplyMessageMediaAttachment.m | 8 ++-- .../Sources/TGSecretTimerMenu.m | 8 ++-- .../Sources/TGSecretTimerPickerItemView.h | 2 +- .../Sources/TGSecretTimerPickerItemView.m | 2 +- .../Sources/TGSecretTimerValueController.h | 2 +- .../TGSecretTimerValueControllerItemView.m | 4 +- .../Sources/TGStaticBackdropAreaData.m | 2 +- .../Sources/TGStaticBackdropImageData.m | 2 +- .../Sources/TGStickerAssociation.m | 4 +- .../LegacyComponents/Sources/TGStickerPack.m | 2 +- .../Sources/TGStickerPackReference.m | 4 +- .../LegacyComponents/Sources/TGStringUtils.mm | 12 +++-- .../Sources/TGTextCheckingResult.m | 2 +- .../LegacyComponents/Sources/TGTextField.m | 4 +- .../LegacyComponents/Sources/TGTimerTarget.m | 2 +- .../Sources/TGToolbarButton.m | 4 +- .../LegacyComponents/Sources/TGTooltipView.m | 6 +-- .../Sources/TGUnsupportedMediaAttachment.m | 2 +- .../Sources/TGViaUserAttachment.m | 8 ++-- .../Sources/TGVideoCameraGLRenderer.m | 2 +- .../Sources/TGVideoCameraGLView.m | 7 ++- .../Sources/TGVideoCameraMovieRecorder.m | 2 +- .../Sources/TGVideoCameraPipeline.m | 9 ++++ .../Sources/TGVideoEditAdjustments.m | 12 ++--- .../LegacyComponents/Sources/TGVideoInfo.mm | 2 +- .../Sources/TGVideoMediaAttachment.m | 14 ++++-- .../Sources/TGVideoMessageCaptureController.m | 13 +++-- .../Sources/TGVideoMessageControls.m | 9 ++-- .../Sources/TGVideoMessageRingView.m | 2 +- .../Sources/TGVideoMessageScrubber.m | 8 ++-- .../TGVideoMessageScrubberThumbnailView.m | 2 +- .../TGViewController+TGRecursiveEnumeration.m | 2 +- .../Sources/TGViewController.mm | 19 +++++--- .../LegacyComponents/Sources/TGWeakDelegate.m | 2 +- .../LegacyComponents/Sources/TGWebDocument.m | 6 +-- .../Sources/TGWebPageMediaAttachment.m | 8 ++-- .../Sources/UICollectionView+Utils.m | 2 +- .../Sources/UIControl+HitTestEdgeInsets.m | 2 +- .../LegacyComponents/Sources/UIImage+TG.m | 2 +- .../Sources/UIImage+TGMediaEditableItem.m | 2 +- .../Sources/UIScrollView+TGHacks.m | 2 +- submodules/LegacyComponents/Sources/mdb.c | 2 +- 357 files changed, 1103 insertions(+), 856 deletions(-) diff --git a/submodules/LegacyComponents/BUILD b/submodules/LegacyComponents/BUILD index afe189ca32..4d2e8687da 100644 --- a/submodules/LegacyComponents/BUILD +++ b/submodules/LegacyComponents/BUILD @@ -29,8 +29,7 @@ objc_library( "PublicHeaders/**/*.h", ]), copts = [ - "-I{}/PublicHeaders/LegacyComponents".format(package_name()), - #"-Werror", + "-Werror", ], includes = [ "PublicHeaders", diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h index 6a96f9b9ec..ddf6e5177f 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h @@ -1,20 +1,20 @@ #import #import +#import #import #import #import #import #import -#import #import #import #import -#import #import #import #import #import +#import #import #import #import @@ -85,8 +85,8 @@ #import #import #import -#import #import +#import #import #import #import @@ -98,6 +98,7 @@ #import #import #import +#import #import #import #import @@ -121,9 +122,10 @@ #import #import #import -#import #import +#import #import +#import #import #import #import @@ -140,9 +142,19 @@ #import #import #import +#import +#import #import +#import #import +#import #import +#import +#import +#import +#import +#import +#import #import #import #import @@ -174,6 +186,7 @@ #import #import #import +#import #import #import #import @@ -203,16 +216,16 @@ #import #import #import +#import #import #import #import #import #import #import -#import +#import #import #import -#import #import #import #import @@ -220,23 +233,34 @@ #import #import #import +#import +#import #import #import #import #import #import +#import +#import #import #import +#import +#import +#import +#import #import +#import #import #import +#import #import #import #import #import -#import #import #import +#import +#import #import #import #import @@ -244,15 +268,22 @@ #import #import #import +#import #import #import #import #import #import +#import +#import +#import #import #import #import #import +#import +#import +#import #import #import #import @@ -260,7 +291,7 @@ #import #import #import +#import #import #import #import -#import diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGInvoiceMediaAttachment.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGInvoiceMediaAttachment.h index c7729a6567..2e46b91d3f 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGInvoiceMediaAttachment.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGInvoiceMediaAttachment.h @@ -1,4 +1,4 @@ -#import "TGMediaAttachment.h" +#import #import diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGMessageEntitiesAttachment.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGMessageEntitiesAttachment.h index 6d99e04cab..3f1561c0c8 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGMessageEntitiesAttachment.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGMessageEntitiesAttachment.h @@ -1,4 +1,4 @@ -#import "TGMediaAttachment.h" +#import #import #import diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGModernGalleryController.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGModernGalleryController.h index c65a9552f9..a0e87b7fe4 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGModernGalleryController.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGModernGalleryController.h @@ -1,5 +1,3 @@ -#import - #import #import diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPassportScanController.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPassportScanController.h index 8108723dfe..4b99f712e4 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPassportScanController.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPassportScanController.h @@ -1,4 +1,5 @@ -#import +#import +#import @class TGPresentation; @class TGPassportMRZ; diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorController.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorController.h index b2406758b0..0df894e7f6 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorController.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorController.h @@ -1,10 +1,9 @@ -#import - #import - #import - #import +#import + +#import @class SSignal; @class PGCameraShotMetadata; diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorTabController.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorTabController.h index c738996f98..c82f93bd56 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorTabController.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoEditorTabController.h @@ -1,5 +1,5 @@ -#import - +#import +#import #import @protocol TGMediaEditAdjustments; diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoVideoEditor.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoVideoEditor.h index 8c113270c6..206fa89ddd 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoVideoEditor.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGPhotoVideoEditor.h @@ -1,4 +1,11 @@ -#import +#import + +#import +#import +#import +#import +#import +#import @interface TGPhotoVideoEditor : NSObject diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGStickerPack.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGStickerPack.h index 3a2f07b25b..d0640257e1 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGStickerPack.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGStickerPack.h @@ -1,6 +1,7 @@ #import -#import +#import +#import @interface TGStickerPack : NSObject diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGVideoMessageCaptureController.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGVideoMessageCaptureController.h index b6343a64a5..1538db8304 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGVideoMessageCaptureController.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGVideoMessageCaptureController.h @@ -1,4 +1,8 @@ -#import +#import +#import +#import +#import +#import @class TGVideoEditAdjustments; @class TGModernConversationInputMicPallete; diff --git a/submodules/LegacyComponents/Sources/ASActor.m b/submodules/LegacyComponents/Sources/ASActor.m index 4ee9ad48fa..5f7dfb4db4 100644 --- a/submodules/LegacyComponents/Sources/ASActor.m +++ b/submodules/LegacyComponents/Sources/ASActor.m @@ -1,6 +1,6 @@ -#import "ASActor.h" +#import -#import "ActionStage.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/ASHandle.m b/submodules/LegacyComponents/Sources/ASHandle.m index 8cfd53620b..a934a5159b 100644 --- a/submodules/LegacyComponents/Sources/ASHandle.m +++ b/submodules/LegacyComponents/Sources/ASHandle.m @@ -1,8 +1,8 @@ -#import "ASHandle.h" +#import #import -#import "ASWatcher.h" +#import @interface ASHandle () { diff --git a/submodules/LegacyComponents/Sources/ASQueue.m b/submodules/LegacyComponents/Sources/ASQueue.m index 347c6de191..1d069a32b6 100644 --- a/submodules/LegacyComponents/Sources/ASQueue.m +++ b/submodules/LegacyComponents/Sources/ASQueue.m @@ -1,6 +1,6 @@ -#import "ASQueue.h" +#import @interface ASQueue () { diff --git a/submodules/LegacyComponents/Sources/AVURLAsset+TGMediaItem.m b/submodules/LegacyComponents/Sources/AVURLAsset+TGMediaItem.m index e2310c1e6c..75d4293a5f 100644 --- a/submodules/LegacyComponents/Sources/AVURLAsset+TGMediaItem.m +++ b/submodules/LegacyComponents/Sources/AVURLAsset+TGMediaItem.m @@ -1,4 +1,4 @@ -#import "AVURLAsset+TGMediaItem.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/ActionStage.mm b/submodules/LegacyComponents/Sources/ActionStage.mm index 7afbbead51..76d9c73ab3 100644 --- a/submodules/LegacyComponents/Sources/ActionStage.mm +++ b/submodules/LegacyComponents/Sources/ActionStage.mm @@ -1,10 +1,10 @@ -#import "ActionStage.h" +#import #import #import "LegacyComponentsInternal.h" -#import "ASActor.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/Freedom.mm b/submodules/LegacyComponents/Sources/Freedom.mm index f25b1e355f..0231a18de9 100644 --- a/submodules/LegacyComponents/Sources/Freedom.mm +++ b/submodules/LegacyComponents/Sources/Freedom.mm @@ -1,4 +1,4 @@ -#import "Freedom.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/FreedomUIKit.m b/submodules/LegacyComponents/Sources/FreedomUIKit.m index bf25711750..620fb701ee 100644 --- a/submodules/LegacyComponents/Sources/FreedomUIKit.m +++ b/submodules/LegacyComponents/Sources/FreedomUIKit.m @@ -1,13 +1,13 @@ -#import "FreedomUIKit.h" +#import #import "LegacyComponentsInternal.h" -#import "Freedom.h" +#import #import #import -#import "TGHacks.h" -#import "TGNavigationController.h" +#import +#import #define DEBUG_KEYBOARD_QUEUE false diff --git a/submodules/LegacyComponents/Sources/GLProgram.m b/submodules/LegacyComponents/Sources/GLProgram.m index 26173d05c6..11d43831e7 100755 --- a/submodules/LegacyComponents/Sources/GLProgram.m +++ b/submodules/LegacyComponents/Sources/GLProgram.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageContext.h b/submodules/LegacyComponents/Sources/GPUImageContext.h index ddd731af16..3979de0e5f 100755 --- a/submodules/LegacyComponents/Sources/GPUImageContext.h +++ b/submodules/LegacyComponents/Sources/GPUImageContext.h @@ -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; diff --git a/submodules/LegacyComponents/Sources/GPUImageContext.m b/submodules/LegacyComponents/Sources/GPUImageContext.m index 81acd833ae..0b19f4ff92 100755 --- a/submodules/LegacyComponents/Sources/GPUImageContext.m +++ b/submodules/LegacyComponents/Sources/GPUImageContext.m @@ -2,6 +2,9 @@ #import #import +#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 diff --git a/submodules/LegacyComponents/Sources/GPUImageFilter.m b/submodules/LegacyComponents/Sources/GPUImageFilter.m index 6205c40a6e..0271c75682 100755 --- a/submodules/LegacyComponents/Sources/GPUImageFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageFramebuffer.m b/submodules/LegacyComponents/Sources/GPUImageFramebuffer.m index 44748f23b1..13f4b82182 100755 --- a/submodules/LegacyComponents/Sources/GPUImageFramebuffer.m +++ b/submodules/LegacyComponents/Sources/GPUImageFramebuffer.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageFramebufferCache.m b/submodules/LegacyComponents/Sources/GPUImageFramebufferCache.m index 627331b2cb..a6dee515b6 100755 --- a/submodules/LegacyComponents/Sources/GPUImageFramebufferCache.m +++ b/submodules/LegacyComponents/Sources/GPUImageFramebufferCache.m @@ -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 }); diff --git a/submodules/LegacyComponents/Sources/GPUImageGaussianBlurFilter.m b/submodules/LegacyComponents/Sources/GPUImageGaussianBlurFilter.m index aacd53ce32..0dffabe0d1 100755 --- a/submodules/LegacyComponents/Sources/GPUImageGaussianBlurFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageGaussianBlurFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageSharpenFilter.m b/submodules/LegacyComponents/Sources/GPUImageSharpenFilter.m index ab75af8496..3d987ad73c 100755 --- a/submodules/LegacyComponents/Sources/GPUImageSharpenFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageSharpenFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageTextureInput.m b/submodules/LegacyComponents/Sources/GPUImageTextureInput.m index ba1284e022..f6735d7e85 100755 --- a/submodules/LegacyComponents/Sources/GPUImageTextureInput.m +++ b/submodules/LegacyComponents/Sources/GPUImageTextureInput.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageThreeInputFilter.m b/submodules/LegacyComponents/Sources/GPUImageThreeInputFilter.m index 665563e6df..ef0233b1fd 100644 --- a/submodules/LegacyComponents/Sources/GPUImageThreeInputFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageThreeInputFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageToneCurveFilter.m b/submodules/LegacyComponents/Sources/GPUImageToneCurveFilter.m index 9a0c901c35..460a2033df 100644 --- a/submodules/LegacyComponents/Sources/GPUImageToneCurveFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageToneCurveFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageTwoInputFilter.m b/submodules/LegacyComponents/Sources/GPUImageTwoInputFilter.m index 29553bcdef..61dbfb4dfb 100755 --- a/submodules/LegacyComponents/Sources/GPUImageTwoInputFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageTwoInputFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageTwoPassFilter.m b/submodules/LegacyComponents/Sources/GPUImageTwoPassFilter.m index dd8643d9f4..cf82bb9246 100755 --- a/submodules/LegacyComponents/Sources/GPUImageTwoPassFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageTwoPassFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/GPUImageTwoPassTextureSamplingFilter.m b/submodules/LegacyComponents/Sources/GPUImageTwoPassTextureSamplingFilter.m index b6a2ec58b4..206ce6745b 100644 --- a/submodules/LegacyComponents/Sources/GPUImageTwoPassTextureSamplingFilter.m +++ b/submodules/LegacyComponents/Sources/GPUImageTwoPassTextureSamplingFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/JNWSpringAnimation.m b/submodules/LegacyComponents/Sources/JNWSpringAnimation.m index 0ec19caaca..5897288620 100644 --- a/submodules/LegacyComponents/Sources/JNWSpringAnimation.m +++ b/submodules/LegacyComponents/Sources/JNWSpringAnimation.m @@ -1,7 +1,7 @@ -#import "JNWSpringAnimation.h" +#import #import "NSValue+JNWAdditions.h" -#import "TGHacks.h" +#import static const CGFloat JNWSpringAnimationDefaultMass = 5.f; static const CGFloat JNWSpringAnimationDefaultDamping = 30.f; diff --git a/submodules/LegacyComponents/Sources/LegacyComponentsContext.m b/submodules/LegacyComponents/Sources/LegacyComponentsContext.m index 4305eeb76d..a15232fbc8 100644 --- a/submodules/LegacyComponents/Sources/LegacyComponentsContext.m +++ b/submodules/LegacyComponents/Sources/LegacyComponentsContext.m @@ -1,4 +1,4 @@ -#import "LegacyComponentsContext.h" +#import @implementation LegacyComponentsActionSheetAction diff --git a/submodules/LegacyComponents/Sources/LegacyComponentsGlobals.m b/submodules/LegacyComponents/Sources/LegacyComponentsGlobals.m index e73cd7291c..ecf6af4c17 100644 --- a/submodules/LegacyComponents/Sources/LegacyComponentsGlobals.m +++ b/submodules/LegacyComponents/Sources/LegacyComponentsGlobals.m @@ -2,7 +2,7 @@ #import "LegacyComponentsInternal.h" -#import "TGLocalization.h" +#import static id _provider; diff --git a/submodules/LegacyComponents/Sources/LegacyComponentsInternal.h b/submodules/LegacyComponents/Sources/LegacyComponentsInternal.h index 5685cba4a8..0f73d0d447 100644 --- a/submodules/LegacyComponents/Sources/LegacyComponentsInternal.h +++ b/submodules/LegacyComponents/Sources/LegacyComponentsInternal.h @@ -1,4 +1,4 @@ -#import "LegacyComponentsGlobals.h" +#import @class TGLocalization; diff --git a/submodules/LegacyComponents/Sources/LegacyComponentsInternal.m b/submodules/LegacyComponents/Sources/LegacyComponentsInternal.m index 8740c1d754..65acd0caaf 100644 --- a/submodules/LegacyComponents/Sources/LegacyComponentsInternal.m +++ b/submodules/LegacyComponents/Sources/LegacyComponentsInternal.m @@ -1,6 +1,6 @@ #import "LegacyComponentsInternal.h" -#import "TGLocalization.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/NSInputStream+TL.m b/submodules/LegacyComponents/Sources/NSInputStream+TL.m index df5388730f..36fd423570 100644 --- a/submodules/LegacyComponents/Sources/NSInputStream+TL.m +++ b/submodules/LegacyComponents/Sources/NSInputStream+TL.m @@ -1,4 +1,4 @@ -#import "NSInputStream+TL.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/NSObject+TGLock.m b/submodules/LegacyComponents/Sources/NSObject+TGLock.m index fd70fde64a..a1a47fd53c 100644 --- a/submodules/LegacyComponents/Sources/NSObject+TGLock.m +++ b/submodules/LegacyComponents/Sources/NSObject+TGLock.m @@ -1,4 +1,4 @@ -#import "NSObject+TGLock.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/PGCamera.m b/submodules/LegacyComponents/Sources/PGCamera.m index 60b9064cc1..7648a7c0cb 100644 --- a/submodules/LegacyComponents/Sources/PGCamera.m +++ b/submodules/LegacyComponents/Sources/PGCamera.m @@ -1,14 +1,14 @@ -#import "PGCamera.h" +#import #import "LegacyComponentsInternal.h" -#import "PGCameraCaptureSession.h" -#import "PGCameraMovieWriter.h" -#import "PGCameraDeviceAngleSampler.h" +#import +#import +#import #import -#import "TGCameraPreviewView.h" +#import 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]; diff --git a/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m b/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m index 14692feffa..6770cc9449 100644 --- a/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m +++ b/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m @@ -1,5 +1,5 @@ -#import "PGCameraCaptureSession.h" -#import "PGCameraMovieWriter.h" +#import +#import #import "PGRectangleDetector.h" #import @@ -15,7 +15,10 @@ #import #import -#import "POPSpringAnimation.h" +#import + +#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; - [maybeFormats addObject:format]; - } else if (!hasSecondaryZoomLevels) { + if (@available(iOS 16.0, *)) { + if (format.secondaryNativeResolutionZoomFactors.count > 0) { + [maybeFormats addObject:format]; + } else { + [maybeFormats addObject:format]; + } + } else { [maybeFormats addObject:format]; } } @@ -1156,3 +1159,5 @@ static UIImageOrientation TGSnapshotOrientationForVideoOrientation(bool mirrored } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/PGCameraDeviceAngleSampler.m b/submodules/LegacyComponents/Sources/PGCameraDeviceAngleSampler.m index 1c742bed83..2358ee7ace 100644 --- a/submodules/LegacyComponents/Sources/PGCameraDeviceAngleSampler.m +++ b/submodules/LegacyComponents/Sources/PGCameraDeviceAngleSampler.m @@ -1,4 +1,4 @@ -#import "PGCameraDeviceAngleSampler.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/PGCameraMovieWriter.m b/submodules/LegacyComponents/Sources/PGCameraMovieWriter.m index 264404d478..236c3a04dc 100644 --- a/submodules/LegacyComponents/Sources/PGCameraMovieWriter.m +++ b/submodules/LegacyComponents/Sources/PGCameraMovieWriter.m @@ -1,4 +1,4 @@ -#import "PGCameraMovieWriter.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/PGCameraShotMetadata.m b/submodules/LegacyComponents/Sources/PGCameraShotMetadata.m index 7189cd749b..75c27c2834 100644 --- a/submodules/LegacyComponents/Sources/PGCameraShotMetadata.m +++ b/submodules/LegacyComponents/Sources/PGCameraShotMetadata.m @@ -1,4 +1,4 @@ -#import "PGCameraShotMetadata.h" +#import @implementation PGCameraShotMetadata diff --git a/submodules/LegacyComponents/Sources/PGCameraVolumeButtonHandler.m b/submodules/LegacyComponents/Sources/PGCameraVolumeButtonHandler.m index 7cd069cbc1..e029a2bd92 100644 --- a/submodules/LegacyComponents/Sources/PGCameraVolumeButtonHandler.m +++ b/submodules/LegacyComponents/Sources/PGCameraVolumeButtonHandler.m @@ -1,9 +1,9 @@ -#import "PGCameraVolumeButtonHandler.h" +#import #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" -#import "Freedom.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/PGPhotoCustomFilterPass.m b/submodules/LegacyComponents/Sources/PGPhotoCustomFilterPass.m index 1c614e3b53..830ff3a367 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoCustomFilterPass.m +++ b/submodules/LegacyComponents/Sources/PGPhotoCustomFilterPass.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/PGPhotoEditorRawDataOutput.m b/submodules/LegacyComponents/Sources/PGPhotoEditorRawDataOutput.m index ebdb30d5d2..7c95051cb6 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoEditorRawDataOutput.m +++ b/submodules/LegacyComponents/Sources/PGPhotoEditorRawDataOutput.m @@ -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; @@ -285,4 +288,6 @@ retainedFramebuffer = nil; } -@end \ No newline at end of file +@end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/PGPhotoEditorValues.m b/submodules/LegacyComponents/Sources/PGPhotoEditorValues.m index 3257dd4b08..2bbb7bcbb2 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoEditorValues.m +++ b/submodules/LegacyComponents/Sources/PGPhotoEditorValues.m @@ -1,7 +1,7 @@ -#import "PGPhotoEditorValues.h" -#import "TGPaintingData.h" +#import +#import -#import "TGPhotoEditorUtils.h" +#import @implementation PGPhotoEditorValues diff --git a/submodules/LegacyComponents/Sources/PGPhotoEditorView.m b/submodules/LegacyComponents/Sources/PGPhotoEditorView.m index 5c6b97f212..c01244bd92 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoEditorView.m +++ b/submodules/LegacyComponents/Sources/PGPhotoEditorView.m @@ -7,6 +7,9 @@ #import #import +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + @interface PGPhotoEditorView () { GPUImageRotationMode inputRotation; @@ -416,3 +419,5 @@ } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/PGPhotoEnhanceLUTGenerator.m b/submodules/LegacyComponents/Sources/PGPhotoEnhanceLUTGenerator.m index cb27aa9fd9..3b701050e0 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoEnhanceLUTGenerator.m +++ b/submodules/LegacyComponents/Sources/PGPhotoEnhanceLUTGenerator.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/PGPhotoGaussianBlurFilter.m b/submodules/LegacyComponents/Sources/PGPhotoGaussianBlurFilter.m index d13751fa11..d18cb99d25 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoGaussianBlurFilter.m +++ b/submodules/LegacyComponents/Sources/PGPhotoGaussianBlurFilter.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/PGPhotoSharpenPass.m b/submodules/LegacyComponents/Sources/PGPhotoSharpenPass.m index 453cb7f2e7..540404df78 100644 --- a/submodules/LegacyComponents/Sources/PGPhotoSharpenPass.m +++ b/submodules/LegacyComponents/Sources/PGPhotoSharpenPass.m @@ -1,5 +1,8 @@ #import "PGPhotoSharpenPass.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + NSString *const kSharpenVertexShaderString = PGShaderString ( attribute vec4 position; @@ -141,4 +144,6 @@ NSString *const kSharpenFragmentShaderString = SHADER_STRING [((PGSharpenFilter *) _filter) setSharpness:_sharpness]; } -@end \ No newline at end of file +@end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/PGVideoMovie.m b/submodules/LegacyComponents/Sources/PGVideoMovie.m index ceb10a7b57..c81b4c3def 100755 --- a/submodules/LegacyComponents/Sources/PGVideoMovie.m +++ b/submodules/LegacyComponents/Sources/PGVideoMovie.m @@ -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 diff --git a/submodules/LegacyComponents/Sources/POPAnimatableProperty.mm b/submodules/LegacyComponents/Sources/POPAnimatableProperty.mm index fef591ccdf..78df068f7d 100644 --- a/submodules/LegacyComponents/Sources/POPAnimatableProperty.mm +++ b/submodules/LegacyComponents/Sources/POPAnimatableProperty.mm @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPAnimatableProperty.h" +#import #import "POPCGUtils.h" #import "POPAnimationRuntime.h" diff --git a/submodules/LegacyComponents/Sources/POPAnimationEvent.mm b/submodules/LegacyComponents/Sources/POPAnimationEvent.mm index d3a13b69c6..e3a062015e 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationEvent.mm +++ b/submodules/LegacyComponents/Sources/POPAnimationEvent.mm @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPAnimationEvent.h" +#import #import "POPAnimationEventInternal.h" static NSString *stringFromType(POPAnimationEventType aType) diff --git a/submodules/LegacyComponents/Sources/POPAnimationEventInternal.h b/submodules/LegacyComponents/Sources/POPAnimationEventInternal.h index 398d59bd1b..708e4ea2dc 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationEventInternal.h +++ b/submodules/LegacyComponents/Sources/POPAnimationEventInternal.h @@ -9,7 +9,7 @@ #import -#import "POPAnimationEvent.h" +#import @interface POPAnimationEvent () diff --git a/submodules/LegacyComponents/Sources/POPAnimationExtras.h b/submodules/LegacyComponents/Sources/POPAnimationExtras.h index 8535909f53..3a80a8cb13 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationExtras.h +++ b/submodules/LegacyComponents/Sources/POPAnimationExtras.h @@ -10,7 +10,7 @@ #import #import "POPDefines.h" -#import "POPSpringAnimation.h" +#import /** @abstract The current drag coefficient. diff --git a/submodules/LegacyComponents/Sources/POPAnimationInternal.h b/submodules/LegacyComponents/Sources/POPAnimationInternal.h index 1c0882c6b9..e28fbf7302 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationInternal.h +++ b/submodules/LegacyComponents/Sources/POPAnimationInternal.h @@ -9,7 +9,7 @@ #import -#import "POPAnimation.h" +#import #import "POPAnimationRuntime.h" #import "POPAnimationTracerInternal.h" #import "POPSpringSolver.h" diff --git a/submodules/LegacyComponents/Sources/POPAnimationPrivate.h b/submodules/LegacyComponents/Sources/POPAnimationPrivate.h index dc1d83931a..1e3a8ac6a3 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationPrivate.h +++ b/submodules/LegacyComponents/Sources/POPAnimationPrivate.h @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPAnimation.h" +#import #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))) diff --git a/submodules/LegacyComponents/Sources/POPAnimationRuntime.mm b/submodules/LegacyComponents/Sources/POPAnimationRuntime.mm index 4e27a6e006..d3e1ac832f 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationRuntime.mm +++ b/submodules/LegacyComponents/Sources/POPAnimationRuntime.mm @@ -20,7 +20,7 @@ #import "POPVector.h" #import "POPAnimationRuntime.h" #import "POPCGUtils.h" -#import "POPGeometry.h" +#import static Boolean pointerEqual(const void *ptr1, const void *ptr2) { return ptr1 == ptr2; diff --git a/submodules/LegacyComponents/Sources/POPAnimationTracer.mm b/submodules/LegacyComponents/Sources/POPAnimationTracer.mm index 243fb9b8f9..a121754252 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationTracer.mm +++ b/submodules/LegacyComponents/Sources/POPAnimationTracer.mm @@ -7,13 +7,13 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPAnimationTracer.h" +#import #import #import "POPAnimationEventInternal.h" #import "POPAnimationInternal.h" -#import "POPSpringAnimation.h" +#import @implementation POPAnimationTracer { diff --git a/submodules/LegacyComponents/Sources/POPAnimationTracerInternal.h b/submodules/LegacyComponents/Sources/POPAnimationTracerInternal.h index 6e3dbcae01..cd406439ee 100644 --- a/submodules/LegacyComponents/Sources/POPAnimationTracerInternal.h +++ b/submodules/LegacyComponents/Sources/POPAnimationTracerInternal.h @@ -9,7 +9,7 @@ #import -#import "POPAnimationTracer.h" +#import @interface POPAnimationTracer (Internal) diff --git a/submodules/LegacyComponents/Sources/POPAnimator.mm b/submodules/LegacyComponents/Sources/POPAnimator.mm index fa9a6390f1..041391df23 100644 --- a/submodules/LegacyComponents/Sources/POPAnimator.mm +++ b/submodules/LegacyComponents/Sources/POPAnimator.mm @@ -16,10 +16,10 @@ #import -#import "POPAnimation.h" +#import #import "POPAnimationExtras.h" #import "POPBasicAnimationInternal.h" -#import "POPDecayAnimation.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/POPBasicAnimationInternal.h b/submodules/LegacyComponents/Sources/POPBasicAnimationInternal.h index e274c3f2f4..6349c34893 100644 --- a/submodules/LegacyComponents/Sources/POPBasicAnimationInternal.h +++ b/submodules/LegacyComponents/Sources/POPBasicAnimationInternal.h @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPBasicAnimation.h" +#import #import "POPPropertyAnimationInternal.h" // default animation duration diff --git a/submodules/LegacyComponents/Sources/POPCustomAnimation.mm b/submodules/LegacyComponents/Sources/POPCustomAnimation.mm index 20e361ac08..c4c51066a0 100644 --- a/submodules/LegacyComponents/Sources/POPCustomAnimation.mm +++ b/submodules/LegacyComponents/Sources/POPCustomAnimation.mm @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPCustomAnimation.h" +#import #import "POPAnimationInternal.h" @interface POPCustomAnimation () diff --git a/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h b/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h index c0969b5a21..0353b113fe 100644 --- a/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h +++ b/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPDecayAnimation.h" +#import #import "POPPropertyAnimationInternal.h" // minimal velocity factor before decay animation is considered complete, in units / s diff --git a/submodules/LegacyComponents/Sources/POPGeometry.mm b/submodules/LegacyComponents/Sources/POPGeometry.mm index 64d11341c9..1d3e83ed40 100644 --- a/submodules/LegacyComponents/Sources/POPGeometry.mm +++ b/submodules/LegacyComponents/Sources/POPGeometry.mm @@ -7,7 +7,7 @@ of patent rights can be found in the PATENTS file in the same directory. */ -#import "POPGeometry.h" +#import #if !TARGET_OS_IPHONE @implementation NSValue (POP) diff --git a/submodules/LegacyComponents/Sources/POPPropertyAnimationInternal.h b/submodules/LegacyComponents/Sources/POPPropertyAnimationInternal.h index 9f2aee4447..587f840698 100644 --- a/submodules/LegacyComponents/Sources/POPPropertyAnimationInternal.h +++ b/submodules/LegacyComponents/Sources/POPPropertyAnimationInternal.h @@ -8,7 +8,7 @@ */ #import "POPAnimationInternal.h" -#import "POPPropertyAnimation.h" +#import static void clampValue(CGFloat &value, CGFloat fromValue, CGFloat toValue, NSUInteger clamp) { diff --git a/submodules/LegacyComponents/Sources/PSKeyValueCoder.m b/submodules/LegacyComponents/Sources/PSKeyValueCoder.m index 20bd9382c0..02dc8f210e 100644 --- a/submodules/LegacyComponents/Sources/PSKeyValueCoder.m +++ b/submodules/LegacyComponents/Sources/PSKeyValueCoder.m @@ -1,4 +1,4 @@ -#import "PSKeyValueCoder.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/PSKeyValueDecoder.m b/submodules/LegacyComponents/Sources/PSKeyValueDecoder.m index b9e695ce5f..4645b4d9ac 100644 --- a/submodules/LegacyComponents/Sources/PSKeyValueDecoder.m +++ b/submodules/LegacyComponents/Sources/PSKeyValueDecoder.m @@ -1,4 +1,4 @@ -#import "PSKeyValueDecoder.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/PSKeyValueEncoder.m b/submodules/LegacyComponents/Sources/PSKeyValueEncoder.m index 23bb690b58..61c8ae6f77 100644 --- a/submodules/LegacyComponents/Sources/PSKeyValueEncoder.m +++ b/submodules/LegacyComponents/Sources/PSKeyValueEncoder.m @@ -1,4 +1,4 @@ -#import "PSKeyValueEncoder.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/PSLMDBKeyValueCursor.m b/submodules/LegacyComponents/Sources/PSLMDBKeyValueCursor.m index acb42e2250..5abbb518c1 100644 --- a/submodules/LegacyComponents/Sources/PSLMDBKeyValueCursor.m +++ b/submodules/LegacyComponents/Sources/PSLMDBKeyValueCursor.m @@ -1,8 +1,8 @@ -#import "PSLMDBKeyValueCursor.h" +#import #import "LegacyComponentsInternal.h" -#import "PSLMDBTable.h" +#import @interface PSLMDBKeyValueCursor () { diff --git a/submodules/LegacyComponents/Sources/PSLMDBKeyValueReaderWriter.m b/submodules/LegacyComponents/Sources/PSLMDBKeyValueReaderWriter.m index 0d3462fcf6..902c43d3e6 100644 --- a/submodules/LegacyComponents/Sources/PSLMDBKeyValueReaderWriter.m +++ b/submodules/LegacyComponents/Sources/PSLMDBKeyValueReaderWriter.m @@ -1,9 +1,9 @@ -#import "PSLMDBKeyValueReaderWriter.h" +#import #import "LegacyComponentsInternal.h" -#import "PSLMDBTable.h" -#import "PSLMDBKeyValueCursor.h" +#import +#import @interface PSLMDBKeyValueReaderWriter () { diff --git a/submodules/LegacyComponents/Sources/PSLMDBKeyValueStore.m b/submodules/LegacyComponents/Sources/PSLMDBKeyValueStore.m index 36b0d6041b..7b8f165e9e 100644 --- a/submodules/LegacyComponents/Sources/PSLMDBKeyValueStore.m +++ b/submodules/LegacyComponents/Sources/PSLMDBKeyValueStore.m @@ -1,11 +1,11 @@ -#import "PSLMDBKeyValueStore.h" +#import #import "LegacyComponentsInternal.h" -#import "lmdb.h" +#import -#import "PSLMDBTable.h" -#import "PSLMDBKeyValueReaderWriter.h" +#import +#import @interface PSLMDBKeyValueStore () { diff --git a/submodules/LegacyComponents/Sources/PSLMDBTable.m b/submodules/LegacyComponents/Sources/PSLMDBTable.m index 74733fa419..7d01f214d9 100644 --- a/submodules/LegacyComponents/Sources/PSLMDBTable.m +++ b/submodules/LegacyComponents/Sources/PSLMDBTable.m @@ -1,4 +1,4 @@ -#import "PSLMDBTable.h" +#import @implementation PSLMDBTable diff --git a/submodules/LegacyComponents/Sources/RMPhoneFormat.m b/submodules/LegacyComponents/Sources/RMPhoneFormat.m index fd00690ef3..7a33ae1abd 100644 --- a/submodules/LegacyComponents/Sources/RMPhoneFormat.m +++ b/submodules/LegacyComponents/Sources/RMPhoneFormat.m @@ -1,4 +1,4 @@ -#import "RMPhoneFormat.h" +#import @interface PhoneRule : NSObject diff --git a/submodules/LegacyComponents/Sources/SGraphListNode.m b/submodules/LegacyComponents/Sources/SGraphListNode.m index 3214653721..c73df83e53 100644 --- a/submodules/LegacyComponents/Sources/SGraphListNode.m +++ b/submodules/LegacyComponents/Sources/SGraphListNode.m @@ -1,4 +1,4 @@ -#import "SGraphListNode.h" +#import @implementation SGraphListNode diff --git a/submodules/LegacyComponents/Sources/SGraphNode.m b/submodules/LegacyComponents/Sources/SGraphNode.m index 79e1d31ba9..a3fb600f29 100644 --- a/submodules/LegacyComponents/Sources/SGraphNode.m +++ b/submodules/LegacyComponents/Sources/SGraphNode.m @@ -1,4 +1,4 @@ -#import "SGraphNode.h" +#import @implementation SGraphNode diff --git a/submodules/LegacyComponents/Sources/SGraphObjectNode.m b/submodules/LegacyComponents/Sources/SGraphObjectNode.m index 2e1542d4c9..3cb39eee52 100644 --- a/submodules/LegacyComponents/Sources/SGraphObjectNode.m +++ b/submodules/LegacyComponents/Sources/SGraphObjectNode.m @@ -1,4 +1,4 @@ -#import "SGraphObjectNode.h" +#import @implementation SGraphObjectNode diff --git a/submodules/LegacyComponents/Sources/TGActionMediaAttachment.m b/submodules/LegacyComponents/Sources/TGActionMediaAttachment.m index 038eb02e36..c919fc2b23 100644 --- a/submodules/LegacyComponents/Sources/TGActionMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGActionMediaAttachment.m @@ -1,6 +1,6 @@ -#import "TGActionMediaAttachment.h" +#import -#import "TGImageMediaAttachment.h" +#import @implementation TGActionMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGAnimationBlockDelegate.m b/submodules/LegacyComponents/Sources/TGAnimationBlockDelegate.m index 770238e192..0de2432cc3 100644 --- a/submodules/LegacyComponents/Sources/TGAnimationBlockDelegate.m +++ b/submodules/LegacyComponents/Sources/TGAnimationBlockDelegate.m @@ -1,4 +1,4 @@ -#import "TGAnimationBlockDelegate.h" +#import @implementation TGAnimationBlockDelegate diff --git a/submodules/LegacyComponents/Sources/TGAttachmentCameraView.m b/submodules/LegacyComponents/Sources/TGAttachmentCameraView.m index 1a7ca9334a..5212c8a6a3 100644 --- a/submodules/LegacyComponents/Sources/TGAttachmentCameraView.m +++ b/submodules/LegacyComponents/Sources/TGAttachmentCameraView.m @@ -1,11 +1,11 @@ -#import "TGAttachmentCameraView.h" -#import "TGImageUtils.h" +#import +#import #import "LegacyComponentsInternal.h" #import #import "TGAttachmentMenuCell.h" -#import "TGCameraController.h" +#import #import #import @@ -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 { diff --git a/submodules/LegacyComponents/Sources/TGAttachmentCarouselItemView.m b/submodules/LegacyComponents/Sources/TGAttachmentCarouselItemView.m index 727164f8dc..f32446d07d 100644 --- a/submodules/LegacyComponents/Sources/TGAttachmentCarouselItemView.m +++ b/submodules/LegacyComponents/Sources/TGAttachmentCarouselItemView.m @@ -1,4 +1,5 @@ -#import "TGAttachmentCarouselItemView.h" +#import +#import #import "LegacyComponentsInternal.h" @@ -13,7 +14,7 @@ #import "TGTransitionLayout.h" -#import "TGAttachmentCameraView.h" +#import #import "TGAttachmentPhotoCell.h" #import "TGAttachmentVideoCell.h" @@ -28,7 +29,7 @@ #import #import -#import "TGMediaAvatarEditorTransition.h" +#import #import #import #import @@ -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]; diff --git a/submodules/LegacyComponents/Sources/TGAttachmentVideoCell.m b/submodules/LegacyComponents/Sources/TGAttachmentVideoCell.m index 5d88df09e4..2a43656782 100644 --- a/submodules/LegacyComponents/Sources/TGAttachmentVideoCell.m +++ b/submodules/LegacyComponents/Sources/TGAttachmentVideoCell.m @@ -1,7 +1,7 @@ #import "TGAttachmentVideoCell.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGAudioMediaAttachment.m b/submodules/LegacyComponents/Sources/TGAudioMediaAttachment.m index ba6bb7dc32..37089fe77b 100644 --- a/submodules/LegacyComponents/Sources/TGAudioMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGAudioMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGAudioMediaAttachment.h" +#import @implementation TGAudioMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGAudioWaveform.m b/submodules/LegacyComponents/Sources/TGAudioWaveform.m index 0802460a06..ec042adf80 100644 --- a/submodules/LegacyComponents/Sources/TGAudioWaveform.m +++ b/submodules/LegacyComponents/Sources/TGAudioWaveform.m @@ -1,8 +1,8 @@ -#import "TGAudioWaveform.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import static int32_t get_bits(uint8_t const *bytes, unsigned int bitOffset, unsigned int numBits) { diff --git a/submodules/LegacyComponents/Sources/TGAuthorSignatureMediaAttachment.m b/submodules/LegacyComponents/Sources/TGAuthorSignatureMediaAttachment.m index cc1f3a4920..dafb13c1d3 100644 --- a/submodules/LegacyComponents/Sources/TGAuthorSignatureMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGAuthorSignatureMediaAttachment.m @@ -1,8 +1,8 @@ -#import "TGAuthorSignatureMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "NSInputStream+TL.h" +#import @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 { diff --git a/submodules/LegacyComponents/Sources/TGBackdropView.m b/submodules/LegacyComponents/Sources/TGBackdropView.m index ad9a8b8066..abc7e7c9e0 100644 --- a/submodules/LegacyComponents/Sources/TGBackdropView.m +++ b/submodules/LegacyComponents/Sources/TGBackdropView.m @@ -1,4 +1,4 @@ -#import "TGBackdropView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGBotComandInfo.m b/submodules/LegacyComponents/Sources/TGBotComandInfo.m index 9e18f66869..0ad5b34012 100644 --- a/submodules/LegacyComponents/Sources/TGBotComandInfo.m +++ b/submodules/LegacyComponents/Sources/TGBotComandInfo.m @@ -1,6 +1,6 @@ -#import "TGBotComandInfo.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGBotComandInfo diff --git a/submodules/LegacyComponents/Sources/TGBotContextResultAttachment.m b/submodules/LegacyComponents/Sources/TGBotContextResultAttachment.m index 862c6de745..9c777b0ca6 100644 --- a/submodules/LegacyComponents/Sources/TGBotContextResultAttachment.m +++ b/submodules/LegacyComponents/Sources/TGBotContextResultAttachment.m @@ -1,6 +1,6 @@ -#import "TGBotContextResultAttachment.h" +#import -#import "NSInputStream+TL.h" +#import @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 diff --git a/submodules/LegacyComponents/Sources/TGBotInfo.m b/submodules/LegacyComponents/Sources/TGBotInfo.m index f575200bad..284f68d044 100644 --- a/submodules/LegacyComponents/Sources/TGBotInfo.m +++ b/submodules/LegacyComponents/Sources/TGBotInfo.m @@ -1,6 +1,6 @@ -#import "TGBotInfo.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGBotInfo diff --git a/submodules/LegacyComponents/Sources/TGBotReplyMarkup.m b/submodules/LegacyComponents/Sources/TGBotReplyMarkup.m index 9c9bfcdb6a..179212e461 100644 --- a/submodules/LegacyComponents/Sources/TGBotReplyMarkup.m +++ b/submodules/LegacyComponents/Sources/TGBotReplyMarkup.m @@ -1,6 +1,6 @@ -#import "TGBotReplyMarkup.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGBotReplyMarkup diff --git a/submodules/LegacyComponents/Sources/TGBotReplyMarkupButton.m b/submodules/LegacyComponents/Sources/TGBotReplyMarkupButton.m index f1e0010427..8f64385831 100644 --- a/submodules/LegacyComponents/Sources/TGBotReplyMarkupButton.m +++ b/submodules/LegacyComponents/Sources/TGBotReplyMarkupButton.m @@ -1,8 +1,8 @@ -#import "TGBotReplyMarkupButton.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGBotReplyMarkupButtonActionUrl diff --git a/submodules/LegacyComponents/Sources/TGBotReplyMarkupRow.m b/submodules/LegacyComponents/Sources/TGBotReplyMarkupRow.m index edd4296131..a857373cbc 100644 --- a/submodules/LegacyComponents/Sources/TGBotReplyMarkupRow.m +++ b/submodules/LegacyComponents/Sources/TGBotReplyMarkupRow.m @@ -1,6 +1,6 @@ -#import "TGBotReplyMarkupRow.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGBotReplyMarkupRow diff --git a/submodules/LegacyComponents/Sources/TGCache.m b/submodules/LegacyComponents/Sources/TGCache.m index 6fc28ec3d4..611207f402 100644 --- a/submodules/LegacyComponents/Sources/TGCache.m +++ b/submodules/LegacyComponents/Sources/TGCache.m @@ -1,8 +1,8 @@ -#import "TGCache.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import #import @@ -29,7 +29,10 @@ static NSString *md5String(NSString *string) const char *ptr = [string UTF8String]; unsigned char md5Buffer[16]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5(ptr, (CC_LONG)[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding], md5Buffer); +#pragma clang diagnostic pop NSString *output = [[NSString alloc] initWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", md5Buffer[0], md5Buffer[1], md5Buffer[2], md5Buffer[3], md5Buffer[4], md5Buffer[5], md5Buffer[6], md5Buffer[7], md5Buffer[8], md5Buffer[9], md5Buffer[10], md5Buffer[11], md5Buffer[12], md5Buffer[13], md5Buffer[14], md5Buffer[15]]; //objc_setAssociatedObject(string, md5PropertyKey, output, OBJC_ASSOCIATION_RETAIN_NONATOMIC); return output; diff --git a/submodules/LegacyComponents/Sources/TGCameraCapturedPhoto.m b/submodules/LegacyComponents/Sources/TGCameraCapturedPhoto.m index 3b0f6a7fc4..86c6d2473b 100644 --- a/submodules/LegacyComponents/Sources/TGCameraCapturedPhoto.m +++ b/submodules/LegacyComponents/Sources/TGCameraCapturedPhoto.m @@ -1,4 +1,4 @@ -#import "TGCameraCapturedPhoto.h" +#import #import #import #import diff --git a/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m b/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m index e9433f57f5..1abb11bbfa 100644 --- a/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m +++ b/submodules/LegacyComponents/Sources/TGCameraCapturedVideo.m @@ -1,14 +1,14 @@ -#import "TGCameraCapturedVideo.h" +#import #import #import #import -#import "LegacyComponentsGlobals.h" -#import "TGStringUtils.h" -#import "TGMediaAsset.h" -#import "TGMediaAsset+TGMediaEditableItem.h" +#import +#import +#import +#import -#import "TGGifConverter.h" +#import @interface TGCameraCapturedVideo () { diff --git a/submodules/LegacyComponents/Sources/TGCameraController.m b/submodules/LegacyComponents/Sources/TGCameraController.m index a1dcb36c64..fd9b44075e 100644 --- a/submodules/LegacyComponents/Sources/TGCameraController.m +++ b/submodules/LegacyComponents/Sources/TGCameraController.m @@ -1,4 +1,5 @@ -#import "TGCameraController.h" +#import +#import #import "LegacyComponentsInternal.h" @@ -29,7 +30,7 @@ #import #import -#import "TGMediaVideoConverter.h" +#import #import #import #import @@ -46,9 +47,9 @@ #import #import -#import "TGMediaPickerGallerySelectedItemsModel.h" -#import "TGCameraCapturedPhoto.h" -#import "TGCameraCapturedVideo.h" +#import +#import +#import #import "PGPhotoEditor.h" #import "PGRectangleDetector.h" @@ -1721,9 +1722,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus }; id windowManager = nil; - id windowContext = nil; windowManager = [strongSelf->_context makeOverlayWindowManager]; - windowContext = [windowManager context]; TGOverlayControllerWindow *controllerWindow = [[TGOverlayControllerWindow alloc] initWithManager:windowManager parentController:strongSelf contentController:(TGOverlayController *)controller]; controllerWindow.hidden = false; @@ -1885,7 +1884,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus return nil; }; - void (^dismissGalleryImpl)() = nil; + __unused void (^dismissGalleryImpl)() = nil; galleryController.completedTransitionOut = ^ { @@ -2926,7 +2925,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus } static dispatch_once_t onceToken; - static UIImage *blankImage; + __unused static UIImage *blankImage; dispatch_once(&onceToken, ^ { UIGraphicsBeginImageContextWithOptions(CGSizeMake(1, 1), true, 0.0f); diff --git a/submodules/LegacyComponents/Sources/TGCameraFlashActiveView.m b/submodules/LegacyComponents/Sources/TGCameraFlashActiveView.m index 71502ab3fd..913cfcefdd 100644 --- a/submodules/LegacyComponents/Sources/TGCameraFlashActiveView.m +++ b/submodules/LegacyComponents/Sources/TGCameraFlashActiveView.m @@ -1,8 +1,8 @@ -#import "TGCameraFlashActiveView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGCameraInterfaceAssets.h" +#import @interface TGCameraFlashActiveView () { diff --git a/submodules/LegacyComponents/Sources/TGCameraFlashControl.m b/submodules/LegacyComponents/Sources/TGCameraFlashControl.m index 5841fa771f..b2d8160cbd 100644 --- a/submodules/LegacyComponents/Sources/TGCameraFlashControl.m +++ b/submodules/LegacyComponents/Sources/TGCameraFlashControl.m @@ -1,15 +1,15 @@ -#import "TGCameraFlashControl.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import -#import "UIControl+HitTestEdgeInsets.h" +#import -#import "TGCameraInterfaceAssets.h" +#import #import -#import "POPBasicAnimation.h" +#import const CGFloat TGCameraFlashControlHeight = 44.0f; diff --git a/submodules/LegacyComponents/Sources/TGCameraFlipButton.m b/submodules/LegacyComponents/Sources/TGCameraFlipButton.m index f2940f368f..3d9989a927 100644 --- a/submodules/LegacyComponents/Sources/TGCameraFlipButton.m +++ b/submodules/LegacyComponents/Sources/TGCameraFlipButton.m @@ -1,8 +1,8 @@ -#import "TGCameraFlipButton.h" +#import -#import "TGCameraInterfaceAssets.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import @implementation TGCameraFlipButton diff --git a/submodules/LegacyComponents/Sources/TGCameraInterfaceAssets.m b/submodules/LegacyComponents/Sources/TGCameraInterfaceAssets.m index 09e169d6c9..da9fab9f95 100644 --- a/submodules/LegacyComponents/Sources/TGCameraInterfaceAssets.m +++ b/submodules/LegacyComponents/Sources/TGCameraInterfaceAssets.m @@ -1,4 +1,4 @@ -#import "TGCameraInterfaceAssets.h" +#import #import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m index b2b12745e4..e20ede364c 100644 --- a/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m +++ b/submodules/LegacyComponents/Sources/TGCameraMainPhoneView.m @@ -1,9 +1,9 @@ -#import "TGCameraMainPhoneView.h" +#import #import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" +#import +#import #import @@ -11,17 +11,17 @@ #import #import -#import "TGModernButton.h" -#import "TGCameraShutterButton.h" -#import "TGCameraModeControl.h" -#import "TGCameraFlashControl.h" -#import "TGCameraFlashActiveView.h" -#import "TGCameraFlipButton.h" -#import "TGCameraTimeCodeView.h" -#import "TGCameraZoomView.h" +#import +#import +#import +#import +#import +#import +#import +#import #import "TGCameraToastView.h" -#import "TGMenuView.h" +#import #import "TGMediaPickerPhotoCounterButton.h" #import "TGMediaPickerPhotoStripView.h" @@ -382,7 +382,7 @@ if (strongSelf == nil) return; - bool change = true; + __unused bool change = true; if (strongSelf.cameraShouldLeaveMode != nil) change = strongSelf.cameraShouldLeaveMode(previousMode); diff --git a/submodules/LegacyComponents/Sources/TGCameraMainTabletView.m b/submodules/LegacyComponents/Sources/TGCameraMainTabletView.m index 7fbb82fca2..0648900b05 100644 --- a/submodules/LegacyComponents/Sources/TGCameraMainTabletView.m +++ b/submodules/LegacyComponents/Sources/TGCameraMainTabletView.m @@ -1,21 +1,21 @@ -#import "TGCameraMainTabletView.h" +#import #import #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import -#import "UIControl+HitTestEdgeInsets.h" +#import -#import "TGCameraInterfaceAssets.h" +#import #import -#import "TGCameraShutterButton.h" -#import "TGCameraModeControl.h" -#import "TGCameraFlipButton.h" -#import "TGCameraTimeCodeView.h" -#import "TGCameraZoomView.h" +#import +#import +#import +#import +#import -#import "TGPhotoEditorUtils.h" +#import #import "TGMediaPickerPhotoCounterButton.h" #import "TGMediaPickerPhotoStripView.h" diff --git a/submodules/LegacyComponents/Sources/TGCameraMainView.m b/submodules/LegacyComponents/Sources/TGCameraMainView.m index 1b257dddb9..74b84448f3 100644 --- a/submodules/LegacyComponents/Sources/TGCameraMainView.m +++ b/submodules/LegacyComponents/Sources/TGCameraMainView.m @@ -1,14 +1,14 @@ -#import "TGCameraMainView.h" +#import #import "LegacyComponentsInternal.h" #import -#import "TGCameraShutterButton.h" -#import "TGCameraFlipButton.h" -#import "TGCameraModeControl.h" -#import "TGCameraTimeCodeView.h" -#import "TGCameraZoomView.h" +#import +#import +#import +#import +#import #import "TGCameraToastView.h" #import "TGMediaPickerPhotoCounterButton.h" @@ -77,6 +77,13 @@ return self; } +- (instancetype)initWithFrame:(CGRect)frame avatar:(bool)avatar videoModeByDefault:(bool)videoModeByDefault camera:(PGCamera *)camera { + self = [super init]; + if (self != nil) { + } + return self; +} + - (void)setResults:(NSArray *)__unused results { } diff --git a/submodules/LegacyComponents/Sources/TGCameraModeControl.m b/submodules/LegacyComponents/Sources/TGCameraModeControl.m index b3ec98d6fa..bf073dab5c 100644 --- a/submodules/LegacyComponents/Sources/TGCameraModeControl.m +++ b/submodules/LegacyComponents/Sources/TGCameraModeControl.m @@ -1,9 +1,9 @@ -#import "TGCameraModeControl.h" +#import #import "LegacyComponentsInternal.h" -#import "TGCameraInterfaceAssets.h" +#import -#import "UIControl+HitTestEdgeInsets.h" +#import const CGFloat TGCameraModeControlVerticalInteritemSpace = 29.0f; diff --git a/submodules/LegacyComponents/Sources/TGCameraPreviewView.m b/submodules/LegacyComponents/Sources/TGCameraPreviewView.m index 4d54e51c3d..f6a98b8469 100644 --- a/submodules/LegacyComponents/Sources/TGCameraPreviewView.m +++ b/submodules/LegacyComponents/Sources/TGCameraPreviewView.m @@ -1,7 +1,7 @@ -#import "TGCameraPreviewView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGCameraRectangleView.m b/submodules/LegacyComponents/Sources/TGCameraRectangleView.m index bfe77c9928..4e5f4d326b 100644 --- a/submodules/LegacyComponents/Sources/TGCameraRectangleView.m +++ b/submodules/LegacyComponents/Sources/TGCameraRectangleView.m @@ -1,9 +1,9 @@ #import "TGCameraRectangleView.h" -#import "TGCameraInterfaceAssets.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import -#import "TGCameraPreviewView.h" +#import #import "PGRectangleDetector.h" @interface TGCameraRectangleView () diff --git a/submodules/LegacyComponents/Sources/TGCameraShutterButton.m b/submodules/LegacyComponents/Sources/TGCameraShutterButton.m index 4bdf177f9c..5f8c3cb58b 100644 --- a/submodules/LegacyComponents/Sources/TGCameraShutterButton.m +++ b/submodules/LegacyComponents/Sources/TGCameraShutterButton.m @@ -1,9 +1,9 @@ -#import "TGCameraShutterButton.h" -#import "TGImageUtils.h" +#import +#import #import -#import "TGCameraInterfaceAssets.h" +#import #import @interface TGCameraShutterButton () diff --git a/submodules/LegacyComponents/Sources/TGCameraTimeCodeView.m b/submodules/LegacyComponents/Sources/TGCameraTimeCodeView.m index 2160cc398f..4e2c993863 100644 --- a/submodules/LegacyComponents/Sources/TGCameraTimeCodeView.m +++ b/submodules/LegacyComponents/Sources/TGCameraTimeCodeView.m @@ -1,4 +1,4 @@ -#import "TGCameraTimeCodeView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGCameraToastView.m b/submodules/LegacyComponents/Sources/TGCameraToastView.m index 6bb98b597e..73bd2fde54 100644 --- a/submodules/LegacyComponents/Sources/TGCameraToastView.m +++ b/submodules/LegacyComponents/Sources/TGCameraToastView.m @@ -1,6 +1,6 @@ #import "TGCameraToastView.h" -#import "TGCameraInterfaceAssets.h" -#import "TGFont.h" +#import +#import @implementation TGCameraToastView { diff --git a/submodules/LegacyComponents/Sources/TGCameraZoomView.m b/submodules/LegacyComponents/Sources/TGCameraZoomView.m index 48b1f47915..6675569d69 100644 --- a/submodules/LegacyComponents/Sources/TGCameraZoomView.m +++ b/submodules/LegacyComponents/Sources/TGCameraZoomView.m @@ -1,9 +1,9 @@ -#import "TGCameraZoomView.h" -#import "TGCameraInterfaceAssets.h" +#import +#import -#import "TGModernButton.h" -#import "TGImageUtils.h" -#import "TGPhotoEditorUtils.h" +#import +#import +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGChannelAdminRights.m b/submodules/LegacyComponents/Sources/TGChannelAdminRights.m index a547f8a812..0a9ae45298 100644 --- a/submodules/LegacyComponents/Sources/TGChannelAdminRights.m +++ b/submodules/LegacyComponents/Sources/TGChannelAdminRights.m @@ -1,6 +1,6 @@ -#import "TGChannelAdminRights.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGChannelAdminRights diff --git a/submodules/LegacyComponents/Sources/TGChannelBannedRights.m b/submodules/LegacyComponents/Sources/TGChannelBannedRights.m index 038019ed64..0f1a08c088 100644 --- a/submodules/LegacyComponents/Sources/TGChannelBannedRights.m +++ b/submodules/LegacyComponents/Sources/TGChannelBannedRights.m @@ -1,6 +1,6 @@ -#import "TGChannelBannedRights.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGChannelBannedRights diff --git a/submodules/LegacyComponents/Sources/TGCheckButtonView.m b/submodules/LegacyComponents/Sources/TGCheckButtonView.m index fbfd97208c..45ee58d9a2 100644 --- a/submodules/LegacyComponents/Sources/TGCheckButtonView.m +++ b/submodules/LegacyComponents/Sources/TGCheckButtonView.m @@ -1,9 +1,9 @@ -#import "TGCheckButtonView.h" +#import -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import -#import "LegacyComponentsGlobals.h" +#import @interface TGCheckButtonView () { diff --git a/submodules/LegacyComponents/Sources/TGContactMediaAttachment.m b/submodules/LegacyComponents/Sources/TGContactMediaAttachment.m index c8f8c5d4ca..096241759b 100644 --- a/submodules/LegacyComponents/Sources/TGContactMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGContactMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGContactMediaAttachment.h" +#import @implementation TGContactMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGConversation.m b/submodules/LegacyComponents/Sources/TGConversation.m index b250f6d810..40b278daf1 100644 --- a/submodules/LegacyComponents/Sources/TGConversation.m +++ b/submodules/LegacyComponents/Sources/TGConversation.m @@ -1,15 +1,15 @@ -#import "TGConversation.h" +#import #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" -#import "TGMessage.h" +#import +#import -#import "PSKeyValueCoder.h" +#import -#import "TGPeerIdAdapter.h" +#import -#import "TGImageInfo.h" -#import "TGMediaOriginInfo.h" +#import +#import @implementation TGEncryptedConversationData diff --git a/submodules/LegacyComponents/Sources/TGDataResource.m b/submodules/LegacyComponents/Sources/TGDataResource.m index 914234a4e3..525644b87f 100644 --- a/submodules/LegacyComponents/Sources/TGDataResource.m +++ b/submodules/LegacyComponents/Sources/TGDataResource.m @@ -1,4 +1,4 @@ -#import "TGDataResource.h" +#import @interface TGDataResource () { diff --git a/submodules/LegacyComponents/Sources/TGDatabaseMessageDraft.m b/submodules/LegacyComponents/Sources/TGDatabaseMessageDraft.m index 2ad2d56a31..32163a8fd9 100644 --- a/submodules/LegacyComponents/Sources/TGDatabaseMessageDraft.m +++ b/submodules/LegacyComponents/Sources/TGDatabaseMessageDraft.m @@ -1,9 +1,9 @@ -#import "TGDatabaseMessageDraft.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import @implementation TGDatabaseMessageDraft diff --git a/submodules/LegacyComponents/Sources/TGDateUtils.mm b/submodules/LegacyComponents/Sources/TGDateUtils.mm index 56f6b29bf4..09fa7c41a1 100644 --- a/submodules/LegacyComponents/Sources/TGDateUtils.mm +++ b/submodules/LegacyComponents/Sources/TGDateUtils.mm @@ -1,9 +1,9 @@ -#include "TGDateUtils.h" +#import #include #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" -#import "TGLocalization.h" +#import +#import static bool value_dateHas12hFormat = false; static __strong NSString *value_monthNamesGenShort[] = { diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeAnimated.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeAnimated.m index 3ec92c9639..a732114374 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeAnimated.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeAnimated.m @@ -1,4 +1,4 @@ -#import "TGDocumentAttributeAnimated.h" +#import @implementation TGDocumentAttributeAnimated diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeAudio.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeAudio.m index 988899977a..a4e381d26d 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeAudio.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeAudio.m @@ -1,8 +1,8 @@ -#import "TGDocumentAttributeAudio.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGDocumentAttributeAudio diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeFilename.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeFilename.m index 3cad9315e6..0b4bd238e9 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeFilename.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeFilename.m @@ -1,8 +1,8 @@ -#import "TGDocumentAttributeFilename.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGDocumentAttributeFilename diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeImageSize.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeImageSize.m index 2d018d271f..eb88822354 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeImageSize.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeImageSize.m @@ -1,6 +1,6 @@ -#import "TGDocumentAttributeImageSize.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGDocumentAttributeImageSize diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeSticker.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeSticker.m index 5b96289448..ce785babda 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeSticker.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeSticker.m @@ -1,8 +1,8 @@ -#import "TGDocumentAttributeSticker.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGStickerMaskDescription diff --git a/submodules/LegacyComponents/Sources/TGDocumentAttributeVideo.m b/submodules/LegacyComponents/Sources/TGDocumentAttributeVideo.m index fa9d9df3f5..c9e4bc2710 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentAttributeVideo.m +++ b/submodules/LegacyComponents/Sources/TGDocumentAttributeVideo.m @@ -1,6 +1,6 @@ -#import "TGDocumentAttributeVideo.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGDocumentAttributeVideo diff --git a/submodules/LegacyComponents/Sources/TGDocumentMediaAttachment.m b/submodules/LegacyComponents/Sources/TGDocumentMediaAttachment.m index 5e8b328d64..b44e536cba 100644 --- a/submodules/LegacyComponents/Sources/TGDocumentMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGDocumentMediaAttachment.m @@ -1,12 +1,12 @@ -#import "TGDocumentMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "PSCoding.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import +#import -#import "TGMessage.h" +#import @interface TGDocumentMediaAttachment () { NSArray *_textCheckingResults; @@ -167,7 +167,7 @@ NSData *originData = nil; @try { - originData = [NSKeyedArchiver archivedDataWithRootObject:_originInfo]; + originData = [NSKeyedArchiver archivedDataWithRootObject:_originInfo requiringSecureCoding:false error:nil]; } @catch (NSException *e) { } @@ -286,7 +286,7 @@ NSData *data = [[NSData alloc] initWithBytesNoCopy:originBytes length:originLength freeWhenDone:true]; TGMediaOriginInfo *origin = nil; @try { - origin = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + origin = [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaOriginInfo class] fromData:data error:nil]; } @catch (NSException *e) { } diff --git a/submodules/LegacyComponents/Sources/TGDoubleTapGestureRecognizer.m b/submodules/LegacyComponents/Sources/TGDoubleTapGestureRecognizer.m index c2bd807c98..91d496b2f0 100644 --- a/submodules/LegacyComponents/Sources/TGDoubleTapGestureRecognizer.m +++ b/submodules/LegacyComponents/Sources/TGDoubleTapGestureRecognizer.m @@ -1,4 +1,4 @@ -#import "TGDoubleTapGestureRecognizer.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGEmbedPIPButton.m b/submodules/LegacyComponents/Sources/TGEmbedPIPButton.m index 482564985d..fda707f00d 100644 --- a/submodules/LegacyComponents/Sources/TGEmbedPIPButton.m +++ b/submodules/LegacyComponents/Sources/TGEmbedPIPButton.m @@ -1,4 +1,4 @@ -#import "TGEmbedPIPButton.h" +#import const CGSize TGEmbedPIPButtonSize = { 42.0f, 42.0f }; diff --git a/submodules/LegacyComponents/Sources/TGEmbedPIPPullArrowView.m b/submodules/LegacyComponents/Sources/TGEmbedPIPPullArrowView.m index fbd13c3c03..2fc2da5497 100644 --- a/submodules/LegacyComponents/Sources/TGEmbedPIPPullArrowView.m +++ b/submodules/LegacyComponents/Sources/TGEmbedPIPPullArrowView.m @@ -1,4 +1,4 @@ -#import "TGEmbedPIPPullArrowView.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGFont.mm b/submodules/LegacyComponents/Sources/TGFont.mm index 5d1ccc575e..a5d261521f 100644 --- a/submodules/LegacyComponents/Sources/TGFont.mm +++ b/submodules/LegacyComponents/Sources/TGFont.mm @@ -1,7 +1,7 @@ -#import "TGFont.h" +#import #import "LegacyComponentsInternal.h" -#import "NSObject+TGLock.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGForwardedMessageMediaAttachment.m b/submodules/LegacyComponents/Sources/TGForwardedMessageMediaAttachment.m index bd7483f49d..1e1327a3c8 100644 --- a/submodules/LegacyComponents/Sources/TGForwardedMessageMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGForwardedMessageMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGForwardedMessageMediaAttachment.h" +#import @implementation TGForwardedMessageMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGFullscreenContainerView.m b/submodules/LegacyComponents/Sources/TGFullscreenContainerView.m index 1e1408ab81..51a64b7c5d 100644 --- a/submodules/LegacyComponents/Sources/TGFullscreenContainerView.m +++ b/submodules/LegacyComponents/Sources/TGFullscreenContainerView.m @@ -1,4 +1,4 @@ -#import "TGFullscreenContainerView.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGGameMediaAttachment.m b/submodules/LegacyComponents/Sources/TGGameMediaAttachment.m index 008b2799e5..1398827bac 100644 --- a/submodules/LegacyComponents/Sources/TGGameMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGGameMediaAttachment.m @@ -1,10 +1,10 @@ -#import "TGGameMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "NSInputStream+TL.h" +#import -#import "TGWebPageMediaAttachment.h" +#import @implementation TGGameMediaAttachment @@ -40,7 +40,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]; @@ -50,7 +50,7 @@ { int32_t length = [is readInt32]; NSData *data = [is readData:length]; - return [NSKeyedUnarchiver unarchiveObjectWithData:data]; + return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil]; } - (TGWebPageMediaAttachment *)webPageWithText:(NSString *)text entities:(NSArray *)entities { diff --git a/submodules/LegacyComponents/Sources/TGGifConverter.m b/submodules/LegacyComponents/Sources/TGGifConverter.m index ce1560786b..3c1cadffef 100644 --- a/submodules/LegacyComponents/Sources/TGGifConverter.m +++ b/submodules/LegacyComponents/Sources/TGGifConverter.m @@ -1,7 +1,7 @@ #import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import #import @@ -107,7 +107,7 @@ const CGFloat TGGifConverterMaximumSide = 720.0f; NSDictionary *videoSettings = @ { - AVVideoCodecKey : AVVideoCodecH264, + AVVideoCodecKey : AVVideoCodecTypeH264, AVVideoCompressionPropertiesKey: codecSettings, AVVideoWidthKey : @((NSInteger)targetSize.width), AVVideoHeightKey : @((NSInteger)targetSize.height) diff --git a/submodules/LegacyComponents/Sources/TGHacks.m b/submodules/LegacyComponents/Sources/TGHacks.m index e8211c63a8..2881334514 100644 --- a/submodules/LegacyComponents/Sources/TGHacks.m +++ b/submodules/LegacyComponents/Sources/TGHacks.m @@ -1,9 +1,9 @@ -#import "TGHacks.h" +#import #import "LegacyComponentsInternal.h" -#import "TGAnimationBlockDelegate.h" +#import -#import "FreedomUIKit.h" +#import #import #import @@ -11,8 +11,8 @@ #import #import -#import "TGViewController.h" -#import "TGNavigationBar.h" +#import +#import static float animationDurationFactor = 1.0f; static float secondaryAnimationDurationFactor = 1.0f; diff --git a/submodules/LegacyComponents/Sources/TGIconSwitchView.m b/submodules/LegacyComponents/Sources/TGIconSwitchView.m index 73a23c727e..8a91e77830 100644 --- a/submodules/LegacyComponents/Sources/TGIconSwitchView.m +++ b/submodules/LegacyComponents/Sources/TGIconSwitchView.m @@ -1,4 +1,4 @@ -#import "TGIconSwitchView.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGImageBlur.m b/submodules/LegacyComponents/Sources/TGImageBlur.m index e175e5084b..015ff9db34 100644 --- a/submodules/LegacyComponents/Sources/TGImageBlur.m +++ b/submodules/LegacyComponents/Sources/TGImageBlur.m @@ -1,14 +1,14 @@ -#import "TGImageBlur.h" +#import #import "LegacyComponentsInternal.h" -#import "LegacyComponentsGlobals.h" -#import "TGImageUtils.h" +#import +#import #import -#import "UIImage+TG.h" -#import "TGStaticBackdropImageData.h" -#import "TGStaticBackdropAreaData.h" +#import +#import +#import static inline uint64_t get_colors (const uint8_t *p) { return p[0] + (p[1] << 16) + ((uint64_t)p[2] << 32); diff --git a/submodules/LegacyComponents/Sources/TGImageDataSource.m b/submodules/LegacyComponents/Sources/TGImageDataSource.m index 204e0c7fad..da2f133963 100644 --- a/submodules/LegacyComponents/Sources/TGImageDataSource.m +++ b/submodules/LegacyComponents/Sources/TGImageDataSource.m @@ -1,4 +1,4 @@ -#import "TGImageDataSource.h" +#import @implementation TGImageDataSource diff --git a/submodules/LegacyComponents/Sources/TGImageInfo.mm b/submodules/LegacyComponents/Sources/TGImageInfo.mm index 6be4f6e9d9..4859556f27 100644 --- a/submodules/LegacyComponents/Sources/TGImageInfo.mm +++ b/submodules/LegacyComponents/Sources/TGImageInfo.mm @@ -1,4 +1,4 @@ -#import "TGImageInfo.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGImageLuminanceMap.m b/submodules/LegacyComponents/Sources/TGImageLuminanceMap.m index 370f21d52e..0a28decc79 100644 --- a/submodules/LegacyComponents/Sources/TGImageLuminanceMap.m +++ b/submodules/LegacyComponents/Sources/TGImageLuminanceMap.m @@ -1,4 +1,4 @@ -#import "TGImageLuminanceMap.h" +#import @interface TGImageLuminanceMap () { diff --git a/submodules/LegacyComponents/Sources/TGImageManager.m b/submodules/LegacyComponents/Sources/TGImageManager.m index 0d0ea6d3d6..d70e4ecabf 100644 --- a/submodules/LegacyComponents/Sources/TGImageManager.m +++ b/submodules/LegacyComponents/Sources/TGImageManager.m @@ -1,6 +1,6 @@ -#import "TGImageManager.h" +#import -#import "TGImageManagerTask.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGImageManagerTask.m b/submodules/LegacyComponents/Sources/TGImageManagerTask.m index bb49544cc8..976f7e2b30 100644 --- a/submodules/LegacyComponents/Sources/TGImageManagerTask.m +++ b/submodules/LegacyComponents/Sources/TGImageManagerTask.m @@ -1,4 +1,4 @@ -#import "TGImageManagerTask.h" +#import @implementation TGImageManagerTask diff --git a/submodules/LegacyComponents/Sources/TGImageMediaAttachment.m b/submodules/LegacyComponents/Sources/TGImageMediaAttachment.m index 25010965aa..68475e272f 100644 --- a/submodules/LegacyComponents/Sources/TGImageMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGImageMediaAttachment.m @@ -1,7 +1,7 @@ -#import "TGImageMediaAttachment.h" +#import -#import "TGMessage.h" -#import "TGStringUtils.h" +#import +#import @interface TGImageMediaAttachment () { @@ -148,7 +148,7 @@ int32_t zero = 0; [data appendBytes:&zero length:4]; } else { - NSData *stickerData = [NSKeyedArchiver archivedDataWithRootObject:_embeddedStickerDocuments]; + NSData *stickerData = [NSKeyedArchiver archivedDataWithRootObject:_embeddedStickerDocuments requiringSecureCoding:false error:nil]; int32_t length = (int32_t)stickerData.length; [data appendBytes:&length length:4]; [data appendData:stickerData]; @@ -156,7 +156,10 @@ NSData *originData = nil; @try { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" originData = [NSKeyedArchiver archivedDataWithRootObject:_originInfo]; +#pragma clang diagnostic pop } @catch (NSException *e) { } @@ -252,7 +255,10 @@ uint8_t *stickerBytes = malloc(stickerDataLength); [is read:stickerBytes maxLength:stickerDataLength]; NSData *stickerData = [[NSData alloc] initWithBytesNoCopy:stickerBytes length:stickerDataLength freeWhenDone:true]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" imageAttachment.embeddedStickerDocuments = [NSKeyedUnarchiver unarchiveObjectWithData:stickerData]; +#pragma clang diagnostic pop } } @@ -266,7 +272,7 @@ NSData *data = [[NSData alloc] initWithBytesNoCopy:originBytes length:originLength freeWhenDone:true]; TGMediaOriginInfo *origin = nil; @try { - origin = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + origin = [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaOriginInfo class] fromData:data error:nil]; } @catch (NSException *e) { } diff --git a/submodules/LegacyComponents/Sources/TGImageUtils.mm b/submodules/LegacyComponents/Sources/TGImageUtils.mm index 71cefd1b26..edd10799c7 100644 --- a/submodules/LegacyComponents/Sources/TGImageUtils.mm +++ b/submodules/LegacyComponents/Sources/TGImageUtils.mm @@ -1,4 +1,4 @@ -#import "TGImageUtils.h" +#import #import "LegacyComponentsInternal.h" @@ -476,7 +476,9 @@ UIImage *TGTintedWithAlphaImage(UIImage *image, UIColor *color) } NSString *TGImageHash(NSData *data) -{ +{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5_CTX md5; CC_MD5_Init(&md5); CC_MD5_Update(&md5, [data bytes], (CC_LONG)data.length); @@ -484,6 +486,7 @@ NSString *TGImageHash(NSData *data) unsigned char md5Buffer[16]; CC_MD5_Final(md5Buffer, &md5); NSString *hash = [[NSString alloc] initWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", md5Buffer[0], md5Buffer[1], md5Buffer[2], md5Buffer[3], md5Buffer[4], md5Buffer[5], md5Buffer[6], md5Buffer[7], md5Buffer[8], md5Buffer[9], md5Buffer[10], md5Buffer[11], md5Buffer[12], md5Buffer[13], md5Buffer[14], md5Buffer[15]]; +#pragma clang diagnostic pop return hash; } diff --git a/submodules/LegacyComponents/Sources/TGImageView.m b/submodules/LegacyComponents/Sources/TGImageView.m index fae3bbe215..08ac004708 100644 --- a/submodules/LegacyComponents/Sources/TGImageView.m +++ b/submodules/LegacyComponents/Sources/TGImageView.m @@ -1,4 +1,4 @@ -#import "TGImageView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGInstantPage.m b/submodules/LegacyComponents/Sources/TGInstantPage.m index 3dbe7e2a8d..19c5fc61aa 100644 --- a/submodules/LegacyComponents/Sources/TGInstantPage.m +++ b/submodules/LegacyComponents/Sources/TGInstantPage.m @@ -1,8 +1,8 @@ -#import "TGInstantPage.h" +#import -#import "TGConversation.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import +#import @implementation TGRichText diff --git a/submodules/LegacyComponents/Sources/TGInvoiceMediaAttachment.m b/submodules/LegacyComponents/Sources/TGInvoiceMediaAttachment.m index 42ed06eca8..8d7f93c434 100644 --- a/submodules/LegacyComponents/Sources/TGInvoiceMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGInvoiceMediaAttachment.m @@ -1,10 +1,10 @@ -#import "TGInvoiceMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "NSInputStream+TL.h" +#import -#import "TGWebPageMediaAttachment.h" +#import @implementation TGInvoiceMediaAttachment @@ -79,7 +79,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]; @@ -89,7 +89,7 @@ { int32_t length = [is readInt32]; NSData *data = [is readData:length]; - return [NSKeyedUnarchiver unarchiveObjectWithData:data]; + return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil]; } diff --git a/submodules/LegacyComponents/Sources/TGKeyCommand.m b/submodules/LegacyComponents/Sources/TGKeyCommand.m index a0ab436233..3838903e6c 100644 --- a/submodules/LegacyComponents/Sources/TGKeyCommand.m +++ b/submodules/LegacyComponents/Sources/TGKeyCommand.m @@ -1,5 +1,5 @@ -#import "TGKeyCommand.h" -#import "TGKeyCommandController.h" +#import +#import #import "LegacyComponentsInternal.h" @implementation TGKeyCommand @@ -57,7 +57,10 @@ return nil; if (iosMajorVersion() >= 9 && _title != nil) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return [UIKeyCommand keyCommandWithInput:_input modifierFlags:_modifierFlags action:@selector(processKeyCommand:) discoverabilityTitle:_title]; +#pragma clang diagnostic pop else return [UIKeyCommand keyCommandWithInput:_input modifierFlags:_modifierFlags action:@selector(processKeyCommand:)]; } diff --git a/submodules/LegacyComponents/Sources/TGKeyCommandController.m b/submodules/LegacyComponents/Sources/TGKeyCommandController.m index a1e3852c4a..b3d755653d 100644 --- a/submodules/LegacyComponents/Sources/TGKeyCommandController.m +++ b/submodules/LegacyComponents/Sources/TGKeyCommandController.m @@ -1,8 +1,8 @@ -#import "TGKeyCommandController.h" +#import #import "LegacyComponentsInternal.h" -#import "TGViewController.h" -#import "TGViewController+TGRecursiveEnumeration.h" +#import +#import @interface TGKeyCommandController () { diff --git a/submodules/LegacyComponents/Sources/TGLabel.m b/submodules/LegacyComponents/Sources/TGLabel.m index 40b0bc85a7..e3fc8fd35b 100644 --- a/submodules/LegacyComponents/Sources/TGLabel.m +++ b/submodules/LegacyComponents/Sources/TGLabel.m @@ -1,4 +1,4 @@ -#import "TGLabel.h" +#import @implementation TGLabel diff --git a/submodules/LegacyComponents/Sources/TGListsTableView.m b/submodules/LegacyComponents/Sources/TGListsTableView.m index 0a191029ab..c0534fabf0 100644 --- a/submodules/LegacyComponents/Sources/TGListsTableView.m +++ b/submodules/LegacyComponents/Sources/TGListsTableView.m @@ -1,8 +1,8 @@ -#import "TGListsTableView.h" +#import #import "LegacyComponentsInternal.h" -#import "POPBasicAnimation.h" -#import "Freedom.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/TGLocalMessageMetaMediaAttachment.m b/submodules/LegacyComponents/Sources/TGLocalMessageMetaMediaAttachment.m index ed1024160a..c37acb0d51 100644 --- a/submodules/LegacyComponents/Sources/TGLocalMessageMetaMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGLocalMessageMetaMediaAttachment.m @@ -1,6 +1,6 @@ -#import "TGLocalMessageMetaMediaAttachment.h" +#import -#import "TGImageInfo.h" +#import @implementation TGLocalMessageMetaMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGLocalization.m b/submodules/LegacyComponents/Sources/TGLocalization.m index 7a602173f1..05dd9f6e0d 100644 --- a/submodules/LegacyComponents/Sources/TGLocalization.m +++ b/submodules/LegacyComponents/Sources/TGLocalization.m @@ -1,6 +1,6 @@ -#import "TGLocalization.h" +#import -#import "TGPluralization.h" +#import static NSDictionary *fallbackDict(NSString *code) { if (code == nil) { diff --git a/submodules/LegacyComponents/Sources/TGLocationMediaAttachment.m b/submodules/LegacyComponents/Sources/TGLocationMediaAttachment.m index 052b9f7be4..d03cc0f77c 100644 --- a/submodules/LegacyComponents/Sources/TGLocationMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGLocationMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGLocationMediaAttachment.h" +#import @implementation TGVenueAttachment @@ -60,7 +60,7 @@ NSData *venueData = nil; if (_venue != nil) - venueData = [NSKeyedArchiver archivedDataWithRootObject:_venue]; + venueData = [NSKeyedArchiver archivedDataWithRootObject:_venue requiringSecureCoding:false error:nil]; int32_t venueDataLength = (int32_t)venueData.length; [data appendBytes:&venueDataLength length:4]; [data appendData:venueData]; @@ -96,7 +96,10 @@ uint8_t *venueBytes = malloc(venueDataLength); [is read:venueBytes maxLength:venueDataLength]; NSData *venueData = [[NSData alloc] initWithBytesNoCopy:venueBytes length:venueDataLength freeWhenDone:true]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" locationAttachment.venue = [NSKeyedUnarchiver unarchiveObjectWithData:venueData]; +#pragma clang diagnostic pop } else if (dataLength == 8 + 8 + 4 + 4) { diff --git a/submodules/LegacyComponents/Sources/TGMediaAsset+TGMediaEditableItem.m b/submodules/LegacyComponents/Sources/TGMediaAsset+TGMediaEditableItem.m index b9713a1f4b..66af90893b 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAsset+TGMediaEditableItem.m +++ b/submodules/LegacyComponents/Sources/TGMediaAsset+TGMediaEditableItem.m @@ -1,4 +1,4 @@ -#import "TGMediaAsset+TGMediaEditableItem.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaAsset.m b/submodules/LegacyComponents/Sources/TGMediaAsset.m index 83cc49b397..e30e05b9ab 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAsset.m +++ b/submodules/LegacyComponents/Sources/TGMediaAsset.m @@ -1,5 +1,5 @@ -#import "TGMediaAsset.h" -#import "TGMediaAssetImageSignals.h" +#import +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetFetchResult.m b/submodules/LegacyComponents/Sources/TGMediaAssetFetchResult.m index 7e3fcd5c47..f427e780f1 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetFetchResult.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetFetchResult.m @@ -1,8 +1,8 @@ -#import "TGMediaAssetFetchResult.h" +#import #import -#import "TGMediaAsset.h" +#import @interface TGMediaAssetFetchResult () { diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetFetchResultChange.m b/submodules/LegacyComponents/Sources/TGMediaAssetFetchResultChange.m index 4a14a90405..ec293d71fe 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetFetchResultChange.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetFetchResultChange.m @@ -1,4 +1,4 @@ -#import "TGMediaAssetFetchResultChange.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetGroup.m b/submodules/LegacyComponents/Sources/TGMediaAssetGroup.m index aff3427f60..5765ab8b3e 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetGroup.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetGroup.m @@ -1,4 +1,4 @@ -#import "TGMediaAssetGroup.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetImageSignals.m b/submodules/LegacyComponents/Sources/TGMediaAssetImageSignals.m index 795b947117..99050d32e0 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetImageSignals.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetImageSignals.m @@ -1,12 +1,12 @@ -#import "TGMediaAssetImageSignals.h" +#import #import #import "TGMediaAssetModernImageSignals.h" -#import "TGPhotoEditorUtils.h" +#import -#import "TGMediaAssetsLibrary.h" +#import const CGSize TGMediaAssetImageLegacySizeLimit = { 2048, 2048 }; diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetModernImageSignals.m b/submodules/LegacyComponents/Sources/TGMediaAssetModernImageSignals.m index d0d33d2e58..c0fce43aed 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetModernImageSignals.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetModernImageSignals.m @@ -1,16 +1,16 @@ #import "TGMediaAssetModernImageSignals.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGStringUtils.h" +#import +#import #import #import -#import "TGPhotoEditorUtils.h" +#import #import -#import "TGMediaAsset.h" +#import @implementation TGMediaAssetModernImageSignals @@ -273,8 +273,11 @@ }; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" PHImageRequestID token = [[self imageManager] requestImageDataForAsset:asset.backingAsset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, __unused UIImageOrientation orientation, NSDictionary *info) { +#pragma clang diagnostic pop bool inCloud = [info[PHImageResultIsInCloudKey] boolValue]; if (inCloud && imageData.length == 0) { @@ -386,8 +389,11 @@ PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init]; options.networkAccessAllowed = false; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" PHContentEditingInputRequestID token = [[self imageManager] requestImageDataForAsset:asset.backingAsset options:options resultHandler:^(NSData *imageData, __unused NSString * dataUTI, __unused UIImageOrientation orientation, __unused NSDictionary *info) { +#pragma clang diagnostic pop if (imageData != nil) { NSDictionary *metadata = [self metadataWithImageData:imageData]; diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetMoment.m b/submodules/LegacyComponents/Sources/TGMediaAssetMoment.m index 00f3a90768..7ba572aff6 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetMoment.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetMoment.m @@ -1,5 +1,5 @@ -#import "TGMediaAssetMoment.h" -#import "TGMediaAssetFetchResult.h" +#import +#import @interface TGMediaAssetMoment () { diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetMomentList.m b/submodules/LegacyComponents/Sources/TGMediaAssetMomentList.m index 5c8a92421e..6406543988 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetMomentList.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetMomentList.m @@ -1,5 +1,5 @@ -#import "TGMediaAssetMomentList.h" -#import "TGMediaAssetFetchResult.h" +#import +#import @interface TGMediaAssetMomentList () { diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsController.m b/submodules/LegacyComponents/Sources/TGMediaAssetsController.m index 778ba168fc..8c9f3a2d7b 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsController.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsController.m @@ -1,3 +1,4 @@ +#import #import "TGMediaAssetsPickerController.h" #import @@ -17,7 +18,7 @@ #import #import -#import "TGModernBarButton.h" +#import #import #import @@ -28,7 +29,7 @@ #import #import -#import "TGModernButton.h" +#import #import "PGPhotoEditor.h" @interface TGMediaPickerAccessView: UIView diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsGifCell.m b/submodules/LegacyComponents/Sources/TGMediaAssetsGifCell.m index 2052108aa3..cffcb0be2d 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsGifCell.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsGifCell.m @@ -1,7 +1,7 @@ #import "TGMediaAssetsGifCell.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import NSString *const TGMediaAssetsGifCellKind = @"TGMediaAssetsGifCellKind"; diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsLibrary.m b/submodules/LegacyComponents/Sources/TGMediaAssetsLibrary.m index f824637158..26542bc716 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsLibrary.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsLibrary.m @@ -1,8 +1,8 @@ -#import "TGMediaAssetsLibrary.h" +#import #import "LegacyComponentsInternal.h" -#import "TGMediaAssetsModernLibrary.h" +#import @implementation TGMediaAssetsLibrary diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsModernLibrary.m b/submodules/LegacyComponents/Sources/TGMediaAssetsModernLibrary.m index c6cc721f93..0e6f96c724 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsModernLibrary.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsModernLibrary.m @@ -1,9 +1,9 @@ -#import "TGMediaAssetsModernLibrary.h" +#import #import "LegacyComponentsInternal.h" -#import "TGMediaAssetFetchResultChange.h" -#import "TGMediaAssetMomentList.h" +#import +#import #import @interface TGMediaAssetsModernLibrary () diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsPickerController.m b/submodules/LegacyComponents/Sources/TGMediaAssetsPickerController.m index bae3594fdd..d11df4757c 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsPickerController.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsPickerController.m @@ -1,3 +1,4 @@ +#import #import "TGMediaAssetsPickerController.h" #import "LegacyComponentsInternal.h" @@ -16,7 +17,7 @@ #import #import -#import "TGModernBarButton.h" +#import #import #import @@ -553,12 +554,6 @@ if (_intent == TGMediaAssetsControllerSetProfilePhotoIntent || _intent == TGMediaAssetsControllerSetSignupProfilePhotoIntent || _intent == TGMediaAssetsControllerSetCustomWallpaperIntent) { return; } - - if (iosMajorVersion() >= 9) - { - if (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable) - [self registerForPreviewingWithDelegate:(id)self sourceView:self.view]; - } } - (UIViewController *)previewingContext:(id)previewingContext viewControllerForLocation:(CGPoint)location @@ -571,7 +566,10 @@ [self _cancelSelectionGestureRecognizer]; CGRect cellFrame = [_collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:indexPath].frame; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" previewingContext.sourceRect = [self.view convertRect:cellFrame fromView:_collectionView]; +#pragma clang diagnostic pop TGMediaAsset *asset = nil; _previewGalleryMixin = [self galleryMixinForIndexPath:indexPath previewMode:true outAsset:&asset]; diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsUtils.m b/submodules/LegacyComponents/Sources/TGMediaAssetsUtils.m index 994368255c..d428cf4bbe 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsUtils.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsUtils.m @@ -1,8 +1,8 @@ #import #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" -#import "TGDateUtils.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsVideoCell.m b/submodules/LegacyComponents/Sources/TGMediaAssetsVideoCell.m index 1c505b91a9..4d0f175a86 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsVideoCell.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsVideoCell.m @@ -1,7 +1,7 @@ #import "TGMediaAssetsVideoCell.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaAttachment.m b/submodules/LegacyComponents/Sources/TGMediaAttachment.m index 3bed1cf633..aa9a3fda77 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaAvatarEditorTransition.m b/submodules/LegacyComponents/Sources/TGMediaAvatarEditorTransition.m index 256b51d0f6..2189fd91d2 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAvatarEditorTransition.m +++ b/submodules/LegacyComponents/Sources/TGMediaAvatarEditorTransition.m @@ -1,4 +1,4 @@ -#import "TGMediaAvatarEditorTransition.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaAvatarMenuMixin.m b/submodules/LegacyComponents/Sources/TGMediaAvatarMenuMixin.m index 113259fed5..27f1375512 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAvatarMenuMixin.m +++ b/submodules/LegacyComponents/Sources/TGMediaAvatarMenuMixin.m @@ -1,3 +1,5 @@ +#import +#import #import #import "LegacyComponentsInternal.h" @@ -8,8 +10,8 @@ #import "TGOverlayFormsheetWindow.h" #import -#import "TGAttachmentCameraView.h" -#import "TGAttachmentCarouselItemView.h" +#import +#import #import #import @@ -353,7 +355,7 @@ else controllerWindow.frame = [_context fullscreenBounds]; - bool standalone = true; + __unused bool standalone = true; CGRect startFrame = CGRectMake(0, screenSize.height, screenSize.width, screenSize.height); if (cameraView != nil) { diff --git a/submodules/LegacyComponents/Sources/TGMediaEditingContext.m b/submodules/LegacyComponents/Sources/TGMediaEditingContext.m index ef53e8cd5b..0df58b712f 100644 --- a/submodules/LegacyComponents/Sources/TGMediaEditingContext.m +++ b/submodules/LegacyComponents/Sources/TGMediaEditingContext.m @@ -1,18 +1,18 @@ -#import "TGMediaEditingContext.h" +#import #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" +#import #import -#import "TGPhotoEditorUtils.h" -#import "PGPhotoEditorValues.h" -#import "TGVideoEditAdjustments.h" +#import +#import +#import -#import "TGModernCache.h" -#import "TGMemoryImageCache.h" -#import "TGMediaAsset.h" +#import +#import +#import -#import "TGPaintingData.h" +#import @interface TGMediaImageUpdate : NSObject diff --git a/submodules/LegacyComponents/Sources/TGMediaGroupCell.m b/submodules/LegacyComponents/Sources/TGMediaGroupCell.m index 0da21877b6..01f378b7ff 100644 --- a/submodules/LegacyComponents/Sources/TGMediaGroupCell.m +++ b/submodules/LegacyComponents/Sources/TGMediaGroupCell.m @@ -1,8 +1,8 @@ #import "TGMediaGroupCell.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import #import "TGColor.h" #import diff --git a/submodules/LegacyComponents/Sources/TGMediaOriginInfo.m b/submodules/LegacyComponents/Sources/TGMediaOriginInfo.m index 0a62731f5f..387af00e5a 100644 --- a/submodules/LegacyComponents/Sources/TGMediaOriginInfo.m +++ b/submodules/LegacyComponents/Sources/TGMediaOriginInfo.m @@ -1,7 +1,7 @@ -#import "TGMediaOriginInfo.h" +#import -#import "TGStringUtils.h" -#import "TGDocumentMediaAttachment.h" +#import +#import @implementation TGMediaOriginInfo diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerCell.m b/submodules/LegacyComponents/Sources/TGMediaPickerCell.m index 56393d555a..9e18d085d3 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerCell.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerCell.m @@ -1,4 +1,4 @@ -#import "TGMediaPickerCell.h" +#import #import "LegacyComponentsInternal.h" #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerController.m b/submodules/LegacyComponents/Sources/TGMediaPickerController.m index cdc6ebec4f..02afafbb20 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerController.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerController.m @@ -1,4 +1,5 @@ -#import "TGMediaPickerController.h" +#import +#import #import @@ -8,10 +9,10 @@ #import "TGMediaPickerSelectionGestureRecognizer.h" -#import "TGMediaPickerLayoutMetrics.h" -#import "TGMediaPickerCell.h" +#import +#import -#import "TGMediaPickerToolbarView.h" +#import #import @@ -275,7 +276,7 @@ UIEdgeInsets contentInset = [self controllerInsetForInterfaceOrientation:self.interfaceOrientation]; #pragma clang diagnostic pop - bool hasOnScreenNavigation = false; + __unused bool hasOnScreenNavigation = false; if (@available(iOS 11.0, *)) { hasOnScreenNavigation = (self.viewLoaded && self.view.safeAreaInsets.bottom > FLT_EPSILON) || self.context.safeAreaInset.bottom > FLT_EPSILON; } diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m index 514d494001..d6e7f8039c 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m @@ -1,8 +1,9 @@ -#import "TGMediaPickerGalleryInterfaceView.h" +#import +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" +#import +#import #import @@ -16,26 +17,26 @@ #import #import #import -#import "TGMediaPickerGallerySelectedItemsModel.h" +#import -#import "TGModernGallerySelectableItem.h" -#import "TGModernGalleryEditableItem.h" -#import "TGMediaPickerGalleryPhotoItem.h" -#import "TGMediaPickerGalleryVideoItem.h" +#import +#import +#import +#import #import "TGMediaPickerGalleryPhotoItemView.h" -#import "TGMediaPickerGalleryVideoItemView.h" +#import #import #import #import #import -#import "TGCheckButtonView.h" +#import #import "TGMediaPickerPhotoCounterButton.h" #import "TGMediaPickerPhotoStripView.h" #import "TGMediaPickerScrubberHeaderView.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryItem.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryItem.m index 0a409c9a30..75267a373f 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryItem.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryItem.m @@ -1,4 +1,4 @@ -#import "TGMediaPickerGalleryItem.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryModel.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryModel.m index 3e04f10560..a26e742813 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryModel.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryModel.m @@ -1,21 +1,22 @@ -#import "TGMediaPickerGalleryModel.h" +#import +#import -#import "TGMediaPickerGallerySelectedItemsModel.h" +#import #import "LegacyComponentsInternal.h" #import #import -#import "TGModernGallerySelectableItem.h" -#import "TGModernGalleryEditableItem.h" -#import "TGModernGalleryEditableItemView.h" -#import "TGMediaPickerGalleryItem.h" +#import +#import +#import +#import #import -#import "TGMediaPickerGalleryPhotoItem.h" -#import "TGMediaPickerGalleryVideoItem.h" -#import "TGMediaPickerGalleryVideoItemView.h" +#import +#import +#import -#import "TGModernMediaListItem.h" +#import #import "TGModernMediaListSelectableItem.h" #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItem.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItem.m index de6ec48c46..d8b2e8af45 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItem.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItem.m @@ -1,7 +1,7 @@ -#import "TGMediaPickerGalleryPhotoItem.h" +#import #import "TGMediaPickerGalleryPhotoItemView.h" -#import "TGMediaAsset+TGMediaEditableItem.h" +#import @implementation TGMediaPickerGalleryPhotoItem diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.h b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.h index 4aea5bc609..a457b8f8bd 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.h +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.h @@ -1,6 +1,6 @@ #import -#import "TGModernGalleryEditableItemView.h" -#import "TGModernGalleryImageItemImageView.h" +#import +#import @interface TGMediaPickerGalleryPhotoItemView : TGModernGalleryZoomableItemView diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.m index 7b6117cf92..a3bd5c8892 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryPhotoItemView.m @@ -1,8 +1,9 @@ +#import #import "TGMediaPickerGalleryPhotoItemView.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGStringUtils.h" +#import +#import #import #import @@ -18,7 +19,7 @@ #import -#import "TGMediaPickerGalleryPhotoItem.h" +#import #import "TGPhotoDrawingController.h" diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGallerySelectedItemsModel.m b/submodules/LegacyComponents/Sources/TGMediaPickerGallerySelectedItemsModel.m index 45e116d207..8b24ae11e5 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGallerySelectedItemsModel.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGallerySelectedItemsModel.m @@ -1,4 +1,4 @@ -#import "TGMediaPickerGallerySelectedItemsModel.h" +#import @interface TGMediaPickerGallerySelectedItemsModel () { diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItem.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItem.m index 42b91ab52f..f3500ece40 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItem.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItem.m @@ -1,16 +1,16 @@ -#import "TGMediaPickerGalleryVideoItem.h" +#import #import "LegacyComponentsInternal.h" -#import "TGMediaPickerGalleryPhotoItem.h" +#import #import "TGMediaPickerGalleryPhotoItemView.h" -#import "TGMediaPickerGalleryVideoItemView.h" +#import #import -#import "TGMediaAsset+TGMediaEditableItem.h" -#import "TGCameraCapturedVideo.h" +#import +#import #import @implementation TGMediaPickerGalleryVideoItem diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m index 581a462475..4efcfc1ef4 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m @@ -1,9 +1,10 @@ -#import "TGMediaPickerGalleryVideoItemView.h" +#import +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" -#import "TGStringUtils.h" +#import +#import +#import #import #import @@ -17,10 +18,10 @@ #import #import -#import "TGMediaPickerGalleryItem.h" -#import "TGMediaPickerGalleryVideoItem.h" +#import +#import -#import "TGCameraCapturedVideo.h" +#import #import #import @@ -1011,7 +1012,7 @@ CGSize originalSize = _videoDimensions; CGRect cropRect = CGRectMake(0, 0, _videoDimensions.width, _videoDimensions.height); UIImageOrientation cropOrientation = UIImageOrientationUp; - bool cropMirrored = false; + __unused bool cropMirrored = false; if (adjustments != nil) { cropRect = adjustments.cropRect; diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoScrubber.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoScrubber.m index e47a8912da..e7a3574de7 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoScrubber.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoScrubber.m @@ -1,10 +1,10 @@ #import "TGMediaPickerGalleryVideoScrubber.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import -#import "POPBasicAnimation.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoTrimView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoTrimView.m index f07983b096..753f1e1c27 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoTrimView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoTrimView.m @@ -5,7 +5,7 @@ #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import @interface TGMediaPickerGalleryVideoTrimView () { diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerLayoutMetrics.m b/submodules/LegacyComponents/Sources/TGMediaPickerLayoutMetrics.m index 9a7b02a269..be4c35c0e1 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerLayoutMetrics.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerLayoutMetrics.m @@ -1,4 +1,4 @@ -#import "TGMediaPickerLayoutMetrics.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerModernGalleryMixin.m b/submodules/LegacyComponents/Sources/TGMediaPickerModernGalleryMixin.m index 756f4deb62..818b272384 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerModernGalleryMixin.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerModernGalleryMixin.m @@ -1,16 +1,16 @@ -#import "TGMediaPickerModernGalleryMixin.h" +#import #import "LegacyComponentsInternal.h" #import #import -#import "TGMediaPickerGalleryItem.h" -#import "TGMediaPickerGalleryPhotoItem.h" -#import "TGMediaPickerGalleryVideoItem.h" -#import "TGMediaPickerGalleryVideoItemView.h" +#import +#import +#import +#import -#import "TGMediaPickerSendActionSheetController.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoCounterButton.m b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoCounterButton.m index cdbf67a314..5a61bec084 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoCounterButton.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoCounterButton.m @@ -1,12 +1,12 @@ #import "TGMediaPickerPhotoCounterButton.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" -#import "TGStringUtils.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import +#import +#import +#import -#import "POPSpringAnimation.h" +#import const CGFloat TGPhotoCounterButtonMaskFade = 18; diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripCell.m b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripCell.m index cad9fb880f..bc5bb4a9c8 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripCell.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripCell.m @@ -1,22 +1,22 @@ #import "TGMediaPickerPhotoStripCell.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import -#import "TGModernButton.h" -#import "TGCheckButtonView.h" +#import +#import #import #import -#import "TGMediaPickerGallerySelectedItemsModel.h" +#import #import #import #import -#import "TGCameraCapturedVideo.h" -#import "TGMediaAsset+TGMediaEditableItem.h" +#import +#import NSString *const TGMediaPickerPhotoStripCellKind = @"PhotoStripCell"; diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripView.m b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripView.m index a87b7b010f..5f866fb5d0 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerPhotoStripView.m @@ -1,11 +1,11 @@ #import "TGMediaPickerPhotoStripView.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import -#import "POPAnimation.h" -#import "POPAnimatableProperty.h" -#import "POPSpringAnimation.h" +#import +#import +#import #import @@ -16,7 +16,7 @@ #import "TGMediaPickerPhotoStripCell.h" -#import "TGMediaPickerGallerySelectedItemsModel.h" +#import @interface TGMediaPickerPhotoStripView () { diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerSendActionSheetController.m b/submodules/LegacyComponents/Sources/TGMediaPickerSendActionSheetController.m index e54924dd5b..2dec4bc6ec 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerSendActionSheetController.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerSendActionSheetController.m @@ -1,10 +1,10 @@ -#import "TGMediaPickerSendActionSheetController.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" -#import "TGModernButton.h" -#import "TGMediaAssetsController.h" +#import +#import +#import +#import @interface TGMediaPickerSendActionSheetItemView : UIView { diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerToolbarView.m b/submodules/LegacyComponents/Sources/TGMediaPickerToolbarView.m index b1e1ed3127..2750bd5dd6 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerToolbarView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerToolbarView.m @@ -1,12 +1,12 @@ -#import "TGMediaPickerToolbarView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" +#import +#import #import "TGColor.h" #import -#import "TGMediaAssetsController.h" +#import const CGFloat TGMediaPickerToolbarHeight = 44.0f; diff --git a/submodules/LegacyComponents/Sources/TGMediaSelectionContext.m b/submodules/LegacyComponents/Sources/TGMediaSelectionContext.m index ed77417c37..d290228bb2 100644 --- a/submodules/LegacyComponents/Sources/TGMediaSelectionContext.m +++ b/submodules/LegacyComponents/Sources/TGMediaSelectionContext.m @@ -1,4 +1,4 @@ -#import "TGMediaSelectionContext.h" +#import @interface TGMediaSelectionChange () diff --git a/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m b/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m index 15189ec41f..40b02b7bed 100644 --- a/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m +++ b/submodules/LegacyComponents/Sources/TGMediaVideoConverter.m @@ -1,4 +1,4 @@ -#import "TGMediaVideoConverter.h" +#import #import #import @@ -8,15 +8,15 @@ #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGPhotoEditorUtils.h" +#import +#import #import "PGPhotoEditor.h" -#import "TGPaintUtils.h" -#import "TGPhotoPaintEntity.h" +#import +#import -#import "TGVideoEditAdjustments.h" -#import "TGPaintingData.h" -#import "TGPhotoPaintStickersContext.h" +#import +#import +#import @interface TGMediaVideoConversionPresetSettings () @@ -402,7 +402,10 @@ if (adjustments.toolsApplied) { editor = [[PGPhotoEditor alloc] initWithOriginalSize:adjustments.originalSize adjustments:adjustments forVideo:true enableStickers:true]; editor.standalone = true; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" ciContext = [CIContext contextWithEAGLContext:[[GPUImageContext sharedImageProcessingContext] context]]; +#pragma clang diagnostic pop } CIImage *backgroundCIImage = nil; @@ -835,6 +838,9 @@ + (NSString *)_hashForVideoWithFileData:(NSData *)fileData timingData:(NSData *)timingData preset:(TGMediaVideoConversionPreset)preset { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + const NSUInteger bufSize = 1024; NSUInteger numberOfBuffersToRead = MIN(32, floor(fileData.length / bufSize)); uint8_t buf[bufSize]; @@ -871,6 +877,8 @@ CC_MD5_Final(md5Buffer, &md5); NSString *hash = [[NSString alloc] initWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", md5Buffer[0], md5Buffer[1], md5Buffer[2], md5Buffer[3], md5Buffer[4], md5Buffer[5], md5Buffer[6], md5Buffer[7], md5Buffer[8], md5Buffer[9], md5Buffer[10], md5Buffer[11], md5Buffer[12], md5Buffer[13], md5Buffer[14], md5Buffer[15]]; +#pragma clang diagnostic pop + return hash; } diff --git a/submodules/LegacyComponents/Sources/TGMemoryImageCache.m b/submodules/LegacyComponents/Sources/TGMemoryImageCache.m index f7c76491e1..1a90c3732d 100644 --- a/submodules/LegacyComponents/Sources/TGMemoryImageCache.m +++ b/submodules/LegacyComponents/Sources/TGMemoryImageCache.m @@ -1,4 +1,4 @@ -#import "TGMemoryImageCache.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetButtonItemView.m b/submodules/LegacyComponents/Sources/TGMenuSheetButtonItemView.m index 8b5d049437..8c1ddfc864 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetButtonItemView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetButtonItemView.m @@ -1,13 +1,13 @@ -#import "TGMenuSheetButtonItemView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import #import "TGColor.h" -#import "TGImageUtils.h" +#import #import -#import "TGMenuSheetController.h" +#import const CGFloat TGMenuSheetButtonItemViewHeight = 57.0f; diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetCollectionView.m b/submodules/LegacyComponents/Sources/TGMenuSheetCollectionView.m index 7cb0d1f944..e6922acb6c 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetCollectionView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetCollectionView.m @@ -1,4 +1,4 @@ -#import "TGMenuSheetCollectionView.h" +#import @implementation TGMenuSheetCollectionView diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetController.m b/submodules/LegacyComponents/Sources/TGMenuSheetController.m index 42b5887cb0..a9e2dc0079 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetController.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetController.m @@ -1,19 +1,19 @@ -#import "TGMenuSheetController.h" +#import #import "LegacyComponentsInternal.h" -#import "LegacyComponentsGlobals.h" -#import "TGNavigationController.h" -#import "TGOverlayController.h" -#import "TGOverlayControllerWindow.h" -#import "TGImageUtils.h" -#import "TGHacks.h" +#import +#import +#import +#import +#import +#import #import -#import "TGMenuSheetView.h" +#import #import "TGMenuSheetDimView.h" -#import "TGMenuSheetItemView.h" -#import "TGMenuSheetCollectionView.h" +#import +#import #import #import @@ -1120,14 +1120,6 @@ typedef enum - (void)setup3DTouch { - if (iosMajorVersion() >= 9 && self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable) - { - for (TGMenuSheetItemView *itemView in _sheetView.itemViews) - { - if (itemView.previewSourceView != nil) - [self registerForPreviewingWithDelegate:itemView sourceView:itemView.previewSourceView]; - } - } } - (void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)__unused popoverPresentationController { diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetDimView.m b/submodules/LegacyComponents/Sources/TGMenuSheetDimView.m index 0f8cbb75c1..952458cb70 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetDimView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetDimView.m @@ -1,5 +1,5 @@ #import "TGMenuSheetDimView.h" -#import "TGMenuSheetView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetItemView.m b/submodules/LegacyComponents/Sources/TGMenuSheetItemView.m index 7da41fba9a..4b9b848c2a 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetItemView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetItemView.m @@ -1,4 +1,4 @@ -#import "TGMenuSheetItemView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetTitleItemView.m b/submodules/LegacyComponents/Sources/TGMenuSheetTitleItemView.m index 15ae64ee8a..8869b2a6dd 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetTitleItemView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetTitleItemView.m @@ -1,9 +1,9 @@ -#import "TGMenuSheetTitleItemView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import -#import "TGMenuSheetController.h" +#import @interface TGMenuSheetTitleItemView () { diff --git a/submodules/LegacyComponents/Sources/TGMenuSheetView.m b/submodules/LegacyComponents/Sources/TGMenuSheetView.m index f54332f2ba..e2d28dbabc 100644 --- a/submodules/LegacyComponents/Sources/TGMenuSheetView.m +++ b/submodules/LegacyComponents/Sources/TGMenuSheetView.m @@ -1,9 +1,9 @@ -#import "TGMenuSheetView.h" -#import "TGMenuSheetItemView.h" -#import "TGMenuSheetController.h" +#import +#import +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import "TGColor.h" NSString *const TGMenuDividerTop = @"top"; diff --git a/submodules/LegacyComponents/Sources/TGMenuView.m b/submodules/LegacyComponents/Sources/TGMenuView.m index 6797ac4953..abe7294fe2 100644 --- a/submodules/LegacyComponents/Sources/TGMenuView.m +++ b/submodules/LegacyComponents/Sources/TGMenuView.m @@ -1,8 +1,8 @@ -#import "TGMenuView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import #import @@ -419,9 +419,9 @@ static UIImage *pagerLeftButtonHighlightedImage() { if (self.buttonHighlightDisabled) return; - NSInteger highlightedIndex = -1; + __unused NSInteger highlightedIndex = -1; - bool arrowHighlighted = false; + __unused bool arrowHighlighted = false; NSInteger index = -1; for (TGMenuButtonView *buttonView in _buttonViews) diff --git a/submodules/LegacyComponents/Sources/TGMessage.mm b/submodules/LegacyComponents/Sources/TGMessage.mm index 0a48ed23d4..52012f3fe1 100644 --- a/submodules/LegacyComponents/Sources/TGMessage.mm +++ b/submodules/LegacyComponents/Sources/TGMessage.mm @@ -1,15 +1,15 @@ -#import "TGMessage.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import +#import #import -#import "TGTextCheckingResult.h" -#import "TGPeerIdAdapter.h" -#import "TGPhoneUtils.h" +#import +#import +#import #include @@ -571,7 +571,7 @@ typedef enum { }]; static NSCharacterSet *characterSet = nil; - static NSCharacterSet *punctuationSet = nil; + __unused static NSCharacterSet *punctuationSet = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^ { diff --git a/submodules/LegacyComponents/Sources/TGMessageEntitiesAttachment.m b/submodules/LegacyComponents/Sources/TGMessageEntitiesAttachment.m index e53491ff12..bce212f7c6 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntitiesAttachment.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntitiesAttachment.m @@ -1,11 +1,11 @@ -#import "TGMessageEntitiesAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import -#import "NSInputStream+TL.h" +#import @implementation TGMessageEntitiesAttachment @@ -46,7 +46,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]; @@ -56,7 +56,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 diff --git a/submodules/LegacyComponents/Sources/TGMessageEntity.m b/submodules/LegacyComponents/Sources/TGMessageEntity.m index c35ccb9449..8db90b1cf3 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntity.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntity.m @@ -1,6 +1,6 @@ -#import "TGMessageEntity.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGMessageEntity diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityBold.m b/submodules/LegacyComponents/Sources/TGMessageEntityBold.m index 02e32ec61a..a9e0c633d8 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityBold.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityBold.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityBold.h" +#import @implementation TGMessageEntityBold diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityBotCommand.m b/submodules/LegacyComponents/Sources/TGMessageEntityBotCommand.m index c2c64411af..8251f4c02f 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityBotCommand.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityBotCommand.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityBotCommand.h" +#import @implementation TGMessageEntityBotCommand diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityCashtag.m b/submodules/LegacyComponents/Sources/TGMessageEntityCashtag.m index 1efc1f1a3d..3f6144b1eb 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityCashtag.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityCashtag.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityCashtag.h" +#import @implementation TGMessageEntityCashtag diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityCode.m b/submodules/LegacyComponents/Sources/TGMessageEntityCode.m index 607a004248..69f2c4bfc4 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityCode.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityCode.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityCode.h" +#import @implementation TGMessageEntityCode diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityEmail.m b/submodules/LegacyComponents/Sources/TGMessageEntityEmail.m index ad82998a44..15888a0596 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityEmail.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityEmail.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityEmail.h" +#import @implementation TGMessageEntityEmail diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityHashtag.m b/submodules/LegacyComponents/Sources/TGMessageEntityHashtag.m index c9b45d2089..45711caf01 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityHashtag.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityHashtag.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityHashtag.h" +#import @implementation TGMessageEntityHashtag diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityItalic.m b/submodules/LegacyComponents/Sources/TGMessageEntityItalic.m index 708789d718..c77c95876d 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityItalic.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityItalic.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityItalic.h" +#import @implementation TGMessageEntityItalic diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityMention.m b/submodules/LegacyComponents/Sources/TGMessageEntityMention.m index 6ebc26171b..569e80b8a0 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityMention.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityMention.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityMention.h" +#import @implementation TGMessageEntityMention diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityMentionName.m b/submodules/LegacyComponents/Sources/TGMessageEntityMentionName.m index ffe5f0297b..a13a622825 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityMentionName.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityMentionName.m @@ -1,6 +1,6 @@ -#import "TGMessageEntityMentionName.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGMessageEntityMentionName diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityPhone.m b/submodules/LegacyComponents/Sources/TGMessageEntityPhone.m index 24376e1d1f..51c5d131ec 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityPhone.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityPhone.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityPhone.h" +#import @implementation TGMessageEntityPhone diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityPre.m b/submodules/LegacyComponents/Sources/TGMessageEntityPre.m index 10efc49cee..8d81ccfb5c 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityPre.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityPre.m @@ -1,6 +1,6 @@ -#import "TGMessageEntityPre.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGMessageEntityPre diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityTextUrl.m b/submodules/LegacyComponents/Sources/TGMessageEntityTextUrl.m index cbd83756b5..566780f3b7 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityTextUrl.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityTextUrl.m @@ -1,6 +1,6 @@ -#import "TGMessageEntityTextUrl.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGMessageEntityTextUrl diff --git a/submodules/LegacyComponents/Sources/TGMessageEntityUrl.m b/submodules/LegacyComponents/Sources/TGMessageEntityUrl.m index d2fc4d3b2a..0d94ce261d 100644 --- a/submodules/LegacyComponents/Sources/TGMessageEntityUrl.m +++ b/submodules/LegacyComponents/Sources/TGMessageEntityUrl.m @@ -1,4 +1,4 @@ -#import "TGMessageEntityUrl.h" +#import @implementation TGMessageEntityUrl diff --git a/submodules/LegacyComponents/Sources/TGMessageGroup.m b/submodules/LegacyComponents/Sources/TGMessageGroup.m index 1156fa551e..ca3f5ed5cb 100644 --- a/submodules/LegacyComponents/Sources/TGMessageGroup.m +++ b/submodules/LegacyComponents/Sources/TGMessageGroup.m @@ -1,4 +1,4 @@ -#import "TGMessageGroup.h" +#import @implementation TGMessageGroup diff --git a/submodules/LegacyComponents/Sources/TGMessageHole.m b/submodules/LegacyComponents/Sources/TGMessageHole.m index 2a31e3376f..2347278250 100644 --- a/submodules/LegacyComponents/Sources/TGMessageHole.m +++ b/submodules/LegacyComponents/Sources/TGMessageHole.m @@ -1,4 +1,4 @@ -#import "TGMessageHole.h" +#import @implementation TGMessageHole diff --git a/submodules/LegacyComponents/Sources/TGMessageImageViewOverlayView.m b/submodules/LegacyComponents/Sources/TGMessageImageViewOverlayView.m index 6343d6fc6e..8e3264810a 100644 --- a/submodules/LegacyComponents/Sources/TGMessageImageViewOverlayView.m +++ b/submodules/LegacyComponents/Sources/TGMessageImageViewOverlayView.m @@ -1,9 +1,9 @@ -#import "TGMessageImageViewOverlayView.h" +#import -#import "POPBasicAnimation.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import "TGColor.h" typedef enum { @@ -665,9 +665,9 @@ const NSInteger TGMessageImageViewOverlayParticlesCount = 40; case TGMessageImageViewOverlayViewTypePlay: { const CGFloat diameter = self.radius; - CGFloat offset = round(diameter * 0.06f); - CGFloat verticalOffset = 0.0f; - CGFloat alpha = 0.8f; + __unused CGFloat offset = round(diameter * 0.06f); + __unused CGFloat verticalOffset = 0.0f; + __unused CGFloat alpha = 0.8f; UIColor *iconColor = TGColorWithHexAndAlpha(0xffffffff, 1.0f); if (diameter <= 25.0f + FLT_EPSILON) { offset = round(50.0f * 0.06f) - 1.0f; @@ -995,7 +995,7 @@ const NSInteger TGMessageImageViewOverlayParticlesCount = 40; { CGFloat diameter = _overlayStyle == TGMessageImageViewOverlayStyleList ? 30.0f : self.radius; CGFloat inset = 0.0f; - CGFloat crossSize = _overlayStyle == TGMessageImageViewOverlayStyleList ? 10.0f : 14.0f; + __unused CGFloat crossSize = _overlayStyle == TGMessageImageViewOverlayStyleList ? 10.0f : 14.0f; if (ABS(diameter - 37.0f) < 0.1) { crossSize = 10.0f; @@ -1027,7 +1027,7 @@ const NSInteger TGMessageImageViewOverlayParticlesCount = 40; CGContextSetBlendMode(context, kCGBlendModeCopy); CGFloat pathLineWidth = 2.0f; - CGFloat pathDiameter = diameter - pathLineWidth; + __unused CGFloat pathDiameter = diameter - pathLineWidth; if (ABS(diameter - 37.0f) < 0.1) { pathLineWidth = 2.5f; diff --git a/submodules/LegacyComponents/Sources/TGMessageViewCountContentProperty.m b/submodules/LegacyComponents/Sources/TGMessageViewCountContentProperty.m index 829f3cd35f..2604dc2d2d 100644 --- a/submodules/LegacyComponents/Sources/TGMessageViewCountContentProperty.m +++ b/submodules/LegacyComponents/Sources/TGMessageViewCountContentProperty.m @@ -1,6 +1,6 @@ -#import "TGMessageViewCountContentProperty.h" +#import -#import "PSKeyValueCoder.h" +#import @implementation TGMessageViewCountContentProperty diff --git a/submodules/LegacyComponents/Sources/TGModernBackToolbarButton.m b/submodules/LegacyComponents/Sources/TGModernBackToolbarButton.m index f050bdfe05..a9cdab8f7e 100644 --- a/submodules/LegacyComponents/Sources/TGModernBackToolbarButton.m +++ b/submodules/LegacyComponents/Sources/TGModernBackToolbarButton.m @@ -1,4 +1,4 @@ -#import "TGModernBackToolbarButton.h" +#import #import "LegacyComponentsInternal.h" #import "TGColor.h" diff --git a/submodules/LegacyComponents/Sources/TGModernBarButton.m b/submodules/LegacyComponents/Sources/TGModernBarButton.m index 5653419492..a113d0830d 100644 --- a/submodules/LegacyComponents/Sources/TGModernBarButton.m +++ b/submodules/LegacyComponents/Sources/TGModernBarButton.m @@ -1,4 +1,4 @@ -#import "TGModernBarButton.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernButton.m b/submodules/LegacyComponents/Sources/TGModernButton.m index 7d04f3a1b8..30564acf50 100644 --- a/submodules/LegacyComponents/Sources/TGModernButton.m +++ b/submodules/LegacyComponents/Sources/TGModernButton.m @@ -1,4 +1,4 @@ -#import "TGModernButton.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGModernCache.m b/submodules/LegacyComponents/Sources/TGModernCache.m index 03ced482b4..d42ea3e272 100644 --- a/submodules/LegacyComponents/Sources/TGModernCache.m +++ b/submodules/LegacyComponents/Sources/TGModernCache.m @@ -1,11 +1,11 @@ -#import "TGModernCache.h" +#import #import "LegacyComponentsInternal.h" -#import "TGStringUtils.h" +#import #import -#import "PSLMDBKeyValueStore.h" +#import typedef enum { TGModernCacheKeyspaceGlobalProperties = 1, diff --git a/submodules/LegacyComponents/Sources/TGModernConversationInputMicButton.m b/submodules/LegacyComponents/Sources/TGModernConversationInputMicButton.m index 8f6ea3a6d1..88bdbba5e9 100644 --- a/submodules/LegacyComponents/Sources/TGModernConversationInputMicButton.m +++ b/submodules/LegacyComponents/Sources/TGModernConversationInputMicButton.m @@ -1,12 +1,12 @@ -#import "TGModernConversationInputMicButton.h" +#import #import "LegacyComponentsInternal.h" #import -#import "TGOverlayController.h" +#import #import "TGColor.h" -#import "TGImageUtils.h" -#import "TGPhotoEditorSparseView.h" +#import +#import static const CGFloat innerCircleRadius = 110.0f; static const CGFloat outerCircleRadius = innerCircleRadius + 50.0f; diff --git a/submodules/LegacyComponents/Sources/TGModernConversationTitleActivityIndicator.m b/submodules/LegacyComponents/Sources/TGModernConversationTitleActivityIndicator.m index c5d7fe7091..9b1e4746d1 100644 --- a/submodules/LegacyComponents/Sources/TGModernConversationTitleActivityIndicator.m +++ b/submodules/LegacyComponents/Sources/TGModernConversationTitleActivityIndicator.m @@ -1,9 +1,9 @@ -#import "TGModernConversationTitleActivityIndicator.h" +#import #import "LegacyComponentsInternal.h" #import "TGColor.h" -#import "TGImageUtils.h" -#import "POPBasicAnimation.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryContainerView.m b/submodules/LegacyComponents/Sources/TGModernGalleryContainerView.m index 7b323230a1..51164884b0 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryContainerView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryContainerView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryContainerView.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryController.m b/submodules/LegacyComponents/Sources/TGModernGalleryController.m index 79390cdb63..6b6f83d8da 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryController.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryController.m @@ -1,8 +1,9 @@ -#import "TGModernGalleryController.h" +#import +#import #import "LegacyComponentsInternal.h" -#import "TGHacks.h" -#import "TGImageUtils.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryDefaultInterfaceView.m b/submodules/LegacyComponents/Sources/TGModernGalleryDefaultInterfaceView.m index a05098eb6c..fc9e1cb9ae 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryDefaultInterfaceView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryDefaultInterfaceView.m @@ -1,14 +1,14 @@ -#import "TGModernGalleryDefaultInterfaceView.h" +#import #import "LegacyComponentsInternal.h" -#import "LegacyComponentsGlobals.h" -#import "TGImageUtils.h" -#import "TGViewController.h" +#import +#import +#import -#import "TGModernGalleryItemView.h" -#import "TGModernGalleryDefaultFooterView.h" +#import +#import -#import "TGModernBackToolbarButton.h" +#import #import @@ -50,7 +50,7 @@ { if (iosMajorVersion() >= 7 && [TGViewController isWidescreen] && [CMMotionActivityManager isActivityAvailable]) { - UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; + UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleMedium]; activityIndicator.alpha = 0.02f; [self addSubview:activityIndicator]; [activityIndicator startAnimating]; diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryImageItem.m b/submodules/LegacyComponents/Sources/TGModernGalleryImageItem.m index 90c0c9191b..99a7da9b1f 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryImageItem.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryImageItem.m @@ -1,8 +1,8 @@ -#import "TGModernGalleryImageItem.h" +#import #import "LegacyComponentsInternal.h" -#import "TGModernGalleryImageItemView.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemContainerView.m b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemContainerView.m index cd00c10391..6d05182bfc 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemContainerView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemContainerView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryImageItemContainerView.h" +#import @interface TGModernGalleryImageItemContainerLayer : CALayer diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemImageView.m b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemImageView.m index 988b754c97..68eeb52439 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemImageView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemImageView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryImageItemImageView.h" +#import @interface TGModernGalleryImageItemImageView () diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemView.m b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemView.m index ef0308ca7d..0e8e419b6d 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryImageItemView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryImageItemView.m @@ -1,12 +1,12 @@ -#import "TGModernGalleryImageItemView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGModernGalleryImageItem.h" +#import #import -#import "TGModernGalleryImageItemImageView.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryItemView.m b/submodules/LegacyComponents/Sources/TGModernGalleryItemView.m index 3deaa9c175..f5e2b6251c 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryItemView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryItemView.m @@ -1,9 +1,9 @@ -#import "TGModernGalleryItemView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGModernGalleryDefaultFooterView.h" -#import "TGModernGalleryDefaultFooterAccessoryView.h" +#import +#import @implementation TGModernGalleryItemView @@ -104,4 +104,8 @@ return nil; } +- (UIView *)transitionContentView { + return nil; +} + @end diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryModel.m b/submodules/LegacyComponents/Sources/TGModernGalleryModel.m index 30ddd274c6..d28b3b38c9 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryModel.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryModel.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryModel.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryScrollView.m b/submodules/LegacyComponents/Sources/TGModernGalleryScrollView.m index 29c259c7b9..9cc70b5d37 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryScrollView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryScrollView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryScrollView.h" +#import @interface TGModernGalleryScrollView () { diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryTransitionView.m b/submodules/LegacyComponents/Sources/TGModernGalleryTransitionView.m index b0697af46a..9159abcfbb 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryTransitionView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryTransitionView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryTransitionView.h" +#import @implementation TGModernGalleryComplexTransitionDescription diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryVideoView.m b/submodules/LegacyComponents/Sources/TGModernGalleryVideoView.m index 8915c81ec1..2437ba1d45 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryVideoView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryVideoView.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryVideoView.h" +#import #import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryView.m b/submodules/LegacyComponents/Sources/TGModernGalleryView.m index a86e027c2a..2aad039c0f 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryView.m @@ -1,9 +1,9 @@ -#import "TGModernGalleryView.h" +#import #import "LegacyComponentsInternal.h" #import "TGColor.h" -#import "TGImageUtils.h" -#import "TGHacks.h" +#import +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableItemView.m b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableItemView.m index 41c86a393f..53cc10a3ae 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableItemView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableItemView.m @@ -1,9 +1,9 @@ -#import "TGModernGalleryZoomableItemView.h" +#import #import #import -#import "TGModernGalleryImageItemContainerView.h" +#import @interface TGModernGalleryZoomableItemView () diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollView.m b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollView.m index 2eb54f6508..81fa285ff0 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollView.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollView.m @@ -1,6 +1,6 @@ -#import "TGModernGalleryZoomableScrollView.h" +#import -#import "TGDoubleTapGestureRecognizer.h" +#import @interface TGModernGalleryZoomableScrollView () { diff --git a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.m b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.m index 18853ecc81..2ffbbe5567 100644 --- a/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.m +++ b/submodules/LegacyComponents/Sources/TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.m @@ -1,4 +1,4 @@ -#import "TGModernGalleryZoomableScrollViewSwipeGestureRecognizer.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGModernToolbarButton.m b/submodules/LegacyComponents/Sources/TGModernToolbarButton.m index 4b1c1b0a98..e82e6a9e68 100644 --- a/submodules/LegacyComponents/Sources/TGModernToolbarButton.m +++ b/submodules/LegacyComponents/Sources/TGModernToolbarButton.m @@ -1,4 +1,4 @@ -#import "TGModernToolbarButton.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGNavigationBar.m b/submodules/LegacyComponents/Sources/TGNavigationBar.m index 7f765de697..cc44398876 100644 --- a/submodules/LegacyComponents/Sources/TGNavigationBar.m +++ b/submodules/LegacyComponents/Sources/TGNavigationBar.m @@ -1,14 +1,14 @@ -#import "TGNavigationBar.h" +#import #import #import "LegacyComponentsInternal.h" #import "TGColor.h" -#import "TGViewController.h" -#import "TGNavigationController.h" +#import +#import -#import "TGHacks.h" +#import #import #import @@ -106,7 +106,10 @@ static id _musicPlayerProvider; self = [super initWithFrame:frame]; if (self) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [self commonInit:[self isKindOfClass:[TGBlackNavigationBar class]] ? UIBarStyleBlackTranslucent : UIBarStyleDefault]; +#pragma clang diagnostic pop } return self; } @@ -148,7 +151,7 @@ static id _musicPlayerProvider; if (iosMajorVersion() >= 7 && iosMajorVersion() < 10 && [TGViewController isWidescreen] && [CMMotionActivityManager isActivityAvailable]) { - TGFixView *activityIndicator = [[TGFixView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; + TGFixView *activityIndicator = [[TGFixView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleMedium]; activityIndicator.alpha = 0.02f; [self addSubview:activityIndicator]; [activityIndicator startAnimating]; @@ -260,12 +263,6 @@ static id _musicPlayerProvider; - (void)setBarStyle:(UIBarStyle)__unused barStyle animated:(bool)__unused animated { - if (iosMajorVersion() < 7) - { - if (self.barStyle != UIBarStyleBlackTranslucent || barStyle != UIBarStyleBlackTranslucent) - barStyle = UIBarStyleBlackTranslucent; - } - [super setBarStyle:barStyle]; } diff --git a/submodules/LegacyComponents/Sources/TGNavigationController.m b/submodules/LegacyComponents/Sources/TGNavigationController.m index bbe04e310f..49f65b796f 100644 --- a/submodules/LegacyComponents/Sources/TGNavigationController.m +++ b/submodules/LegacyComponents/Sources/TGNavigationController.m @@ -1,16 +1,16 @@ -#import "TGNavigationController.h" +#import #import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGStringUtils.h" -#import "Freedom.h" +#import +#import +#import -#import "TGNavigationBar.h" -#import "TGViewController.h" +#import +#import -#import "TGHacks.h" +#import #import #import @@ -491,7 +491,7 @@ - (void)setupNavigationBarForController:(UIViewController *)viewController animated:(bool)animated { - UIBarStyle barStyle = UIBarStyleDefault; + bool navigationBarShouldBeHidden = false; UIStatusBarStyle statusBarStyle = UIStatusBarStyleLightContent; bool statusBarShouldBeHidden = false; @@ -500,7 +500,6 @@ { id appearance = (id)viewController; - barStyle = [appearance requiredNavigationBarStyle]; navigationBarShouldBeHidden = [appearance navigationBarShouldBeHidden]; if ([appearance respondsToSelector:@selector(preferredStatusBarStyle)]) statusBarStyle = [appearance preferredStatusBarStyle]; diff --git a/submodules/LegacyComponents/Sources/TGObserverProxy.m b/submodules/LegacyComponents/Sources/TGObserverProxy.m index 407c78cf18..2984e06d68 100644 --- a/submodules/LegacyComponents/Sources/TGObserverProxy.m +++ b/submodules/LegacyComponents/Sources/TGObserverProxy.m @@ -1,4 +1,4 @@ -#import "TGObserverProxy.h" +#import @interface TGObserverProxyScheduledNotification : NSObject diff --git a/submodules/LegacyComponents/Sources/TGOverlayController.m b/submodules/LegacyComponents/Sources/TGOverlayController.m index fc7cdfb7ab..5d8cef19cc 100644 --- a/submodules/LegacyComponents/Sources/TGOverlayController.m +++ b/submodules/LegacyComponents/Sources/TGOverlayController.m @@ -1,6 +1,6 @@ -#import "TGOverlayController.h" +#import -#import "TGOverlayControllerWindow.h" +#import @interface TGOverlayController () diff --git a/submodules/LegacyComponents/Sources/TGOverlayControllerWindow.m b/submodules/LegacyComponents/Sources/TGOverlayControllerWindow.m index 1d7d18f920..ecd24a680e 100644 --- a/submodules/LegacyComponents/Sources/TGOverlayControllerWindow.m +++ b/submodules/LegacyComponents/Sources/TGOverlayControllerWindow.m @@ -1,10 +1,10 @@ -#import "TGOverlayControllerWindow.h" +#import #import "LegacyComponentsInternal.h" -#import "TGHacks.h" +#import -#import "TGViewController.h" -#import "TGOverlayController.h" +#import +#import @implementation TGOverlayWindowViewController diff --git a/submodules/LegacyComponents/Sources/TGOverlayFormsheetWindow.m b/submodules/LegacyComponents/Sources/TGOverlayFormsheetWindow.m index 7650714b0c..a72bb8f5c9 100644 --- a/submodules/LegacyComponents/Sources/TGOverlayFormsheetWindow.m +++ b/submodules/LegacyComponents/Sources/TGOverlayFormsheetWindow.m @@ -1,7 +1,7 @@ #import "TGOverlayFormsheetWindow.h" #import "LegacyComponentsInternal.h" -#import "TGViewController.h" +#import #import "TGOverlayFormsheetController.h" diff --git a/submodules/LegacyComponents/Sources/TGPaintFaceDetector.m b/submodules/LegacyComponents/Sources/TGPaintFaceDetector.m index 67833111d2..60b1ac0a7d 100644 --- a/submodules/LegacyComponents/Sources/TGPaintFaceDetector.m +++ b/submodules/LegacyComponents/Sources/TGPaintFaceDetector.m @@ -3,8 +3,8 @@ #import #import -#import "TGMediaEditingContext.h" -#import "UIImage+TG.h" +#import +#import @interface TGPaintFace () diff --git a/submodules/LegacyComponents/Sources/TGPaintShader.m b/submodules/LegacyComponents/Sources/TGPaintShader.m index 99fa31d7e5..edfc7d8c05 100644 --- a/submodules/LegacyComponents/Sources/TGPaintShader.m +++ b/submodules/LegacyComponents/Sources/TGPaintShader.m @@ -1,4 +1,4 @@ -#import "TGPaintShader.h" +#import #import "LegacyComponentsInternal.h" @@ -6,6 +6,9 @@ #import +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + @implementation TGPaintShader - (instancetype)initWithVertexShader:(NSString *)vertexShader fragmentShader:(NSString *)fragmentShader attributes:(NSArray *)attributes uniforms:(NSArray *)uniforms @@ -158,3 +161,5 @@ } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/TGPaintUtils.m b/submodules/LegacyComponents/Sources/TGPaintUtils.m index d8c3fabf31..4d37c06e66 100644 --- a/submodules/LegacyComponents/Sources/TGPaintUtils.m +++ b/submodules/LegacyComponents/Sources/TGPaintUtils.m @@ -1,5 +1,5 @@ -#import "TGPaintUtils.h" -#import "TGPhotoEditorUtils.h" +#import +#import #import "LegacyComponentsInternal.h" @@ -62,7 +62,10 @@ void TGSetupColorUniform(GLint location, UIColor *color) red = green = blue = components[0]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" glUniform4f(location, (GLfloat)red, (GLfloat)green, (GLfloat)blue, (GLfloat)alpha); +#pragma clang diagnostic pop } UIImage *TGPaintCombineImages(UIImage *background, UIImage *foreground, bool opaque) diff --git a/submodules/LegacyComponents/Sources/TGPaintingData.m b/submodules/LegacyComponents/Sources/TGPaintingData.m index 59a89746c5..99ec166695 100644 --- a/submodules/LegacyComponents/Sources/TGPaintingData.m +++ b/submodules/LegacyComponents/Sources/TGPaintingData.m @@ -1,11 +1,11 @@ -#import "TGPaintingData.h" +#import #import -#import "TGPaintUtils.h" -#import "TGPhotoPaintStickerEntity.h" +#import +#import -#import "TGMediaEditingContext.h" +#import @interface TGPaintingData () { diff --git a/submodules/LegacyComponents/Sources/TGPassportAttachMenu.m b/submodules/LegacyComponents/Sources/TGPassportAttachMenu.m index ee938b1c84..bc2a436872 100644 --- a/submodules/LegacyComponents/Sources/TGPassportAttachMenu.m +++ b/submodules/LegacyComponents/Sources/TGPassportAttachMenu.m @@ -1,14 +1,15 @@ -#import "TGPassportAttachMenu.h" +#import +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import #import #import "TGOverlayFormsheetWindow.h" #import -#import "TGAttachmentCameraView.h" +#import #import @@ -154,7 +155,7 @@ return; __weak TGViewController *weakParentController = parentController; - void (^presentBlock)(TGMediaAssetsController *) = nil; + __unused void (^presentBlock)(TGMediaAssetsController *) = nil; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { @@ -312,7 +313,7 @@ else controllerWindow.frame = [context fullscreenBounds]; - bool standalone = true; + __unused bool standalone = true; CGRect startFrame = CGRectMake(0, screenSize.height, screenSize.width, screenSize.height); if (cameraView != nil) { diff --git a/submodules/LegacyComponents/Sources/TGPassportICloud.m b/submodules/LegacyComponents/Sources/TGPassportICloud.m index cb46ac0813..0d71093ef7 100644 --- a/submodules/LegacyComponents/Sources/TGPassportICloud.m +++ b/submodules/LegacyComponents/Sources/TGPassportICloud.m @@ -1,4 +1,4 @@ -#import "TGPassportICloud.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGPassportMRZ.m b/submodules/LegacyComponents/Sources/TGPassportMRZ.m index f20b60e992..09b15042c8 100644 --- a/submodules/LegacyComponents/Sources/TGPassportMRZ.m +++ b/submodules/LegacyComponents/Sources/TGPassportMRZ.m @@ -1,4 +1,4 @@ -#import "TGPassportMRZ.h" +#import const NSUInteger TGPassportTD1Length = 30; const NSUInteger TGPassportTD23Length = 44; diff --git a/submodules/LegacyComponents/Sources/TGPassportOCR.mm b/submodules/LegacyComponents/Sources/TGPassportOCR.mm index 37d3b733fa..7b7da63957 100644 --- a/submodules/LegacyComponents/Sources/TGPassportOCR.mm +++ b/submodules/LegacyComponents/Sources/TGPassportOCR.mm @@ -1,9 +1,9 @@ -#import "TGPassportOCR.h" +#import #import "LegacyComponentsInternal.h" #import -#import "TGPassportMRZ.h" +#import #import "ocr.h" @implementation TGPassportOCR diff --git a/submodules/LegacyComponents/Sources/TGPassportScanController.m b/submodules/LegacyComponents/Sources/TGPassportScanController.m index 6bf289d7da..eac69da14f 100644 --- a/submodules/LegacyComponents/Sources/TGPassportScanController.m +++ b/submodules/LegacyComponents/Sources/TGPassportScanController.m @@ -1,4 +1,5 @@ -#import "TGPassportScanController.h" +#import +#import #import "TGPassportScanView.h" #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGPassportScanView.m b/submodules/LegacyComponents/Sources/TGPassportScanView.m index 5ad5bbe3b4..5e45beff48 100644 --- a/submodules/LegacyComponents/Sources/TGPassportScanView.m +++ b/submodules/LegacyComponents/Sources/TGPassportScanView.m @@ -1,12 +1,12 @@ #import "TGPassportScanView.h" -#import "PGCamera.h" -#import "TGCameraPreviewView.h" +#import +#import -#import "TGPassportOCR.h" +#import #import "LegacyComponentsInternal.h" -#import "TGTimerTarget.h" +#import @interface TGPassportScanView () { diff --git a/submodules/LegacyComponents/Sources/TGPhoneUtils.m b/submodules/LegacyComponents/Sources/TGPhoneUtils.m index a82c71f000..ad18e04de1 100644 --- a/submodules/LegacyComponents/Sources/TGPhoneUtils.m +++ b/submodules/LegacyComponents/Sources/TGPhoneUtils.m @@ -1,6 +1,6 @@ -#import "TGPhoneUtils.h" +#import -#import "RMPhoneFormat.h" +#import @implementation TGPhoneUtils diff --git a/submodules/LegacyComponents/Sources/TGPhotoAvatarCropView.m b/submodules/LegacyComponents/Sources/TGPhotoAvatarCropView.m index 6dc6c052ad..4ba5a8c9a3 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoAvatarCropView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoAvatarCropView.m @@ -1,4 +1,4 @@ -#import "TGPhotoAvatarCropView.h" +#import #import #import @@ -6,7 +6,7 @@ #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "PGPhotoEditorView.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoAvatarPreviewController.m b/submodules/LegacyComponents/Sources/TGPhotoAvatarPreviewController.m index ed101da016..4a3720cf99 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoAvatarPreviewController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoAvatarPreviewController.m @@ -1,24 +1,25 @@ +#import #import "TGPhotoAvatarPreviewController.h" #import "LegacyComponentsInternal.h" #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "PGPhotoEditor.h" #import "PGPhotoEditorView.h" #import #import -#import "TGPhotoEditorController.h" +#import #import "TGPhotoEditorPreviewView.h" -#import "TGPhotoAvatarCropView.h" +#import #import "TGMediaPickerGalleryVideoScrubber.h" -#import "TGModernGalleryVideoView.h" +#import -#import "TGPhotoPaintStickersContext.h" +#import #import "TGPhotoDrawingController.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoCaptionInputMixin.m b/submodules/LegacyComponents/Sources/TGPhotoCaptionInputMixin.m index dbd7816265..e7db8f034c 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCaptionInputMixin.m +++ b/submodules/LegacyComponents/Sources/TGPhotoCaptionInputMixin.m @@ -1,10 +1,10 @@ -#import "TGPhotoCaptionInputMixin.h" +#import #import #import -#import "TGPhotoPaintStickersContext.h" +#import @interface TGPhotoCaptionInputMixin () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoCropController.h b/submodules/LegacyComponents/Sources/TGPhotoCropController.h index e57c46f976..1a32504b05 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCropController.h +++ b/submodules/LegacyComponents/Sources/TGPhotoCropController.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorTabController.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoCropController.m b/submodules/LegacyComponents/Sources/TGPhotoCropController.m index 59c5fb5d8e..f197b0418f 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCropController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoCropController.m @@ -1,3 +1,4 @@ +#import #import "TGPhotoCropController.h" #import "LegacyComponentsInternal.h" @@ -9,7 +10,7 @@ #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "PGPhotoEditor.h" @@ -19,9 +20,9 @@ #import "TGPhotoEditorPreviewView.h" #import "TGPhotoCropView.h" -#import "TGModernButton.h" +#import -#import "TGMenuSheetController.h" +#import const CGFloat TGPhotoCropButtonsWrapperSize = 61.0f; const CGSize TGPhotoCropAreaInsetSize = { 9, 9 }; @@ -580,10 +581,13 @@ NSString * const TGPhotoCropOriginalAspectRatio = @"original"; [strongSelf _updateTabs]; }; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) setAspectRatioBlock(); else TGDispatchAfter(0.1f, dispatch_get_main_queue(), setAspectRatioBlock); +#pragma clang diagnostic pop [strongController dismissAnimated:true]; }; diff --git a/submodules/LegacyComponents/Sources/TGPhotoCropGridView.m b/submodules/LegacyComponents/Sources/TGPhotoCropGridView.m index a1a96c7821..5a93fe4d9f 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCropGridView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoCropGridView.m @@ -1,7 +1,7 @@ #import "TGPhotoCropGridView.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import const NSInteger TGPhotoCropMajorGridViewLinesCount = 2; const NSInteger TGPhotoCropMinorGridViewLinesCount = 8; diff --git a/submodules/LegacyComponents/Sources/TGPhotoCropRotationView.m b/submodules/LegacyComponents/Sources/TGPhotoCropRotationView.m index 481be6d11d..2e810d5d56 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCropRotationView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoCropRotationView.m @@ -1,7 +1,7 @@ #import "TGPhotoCropRotationView.h" #import "LegacyComponentsInternal.h" -#import "POPSpringAnimation.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoCropView.m b/submodules/LegacyComponents/Sources/TGPhotoCropView.m index 7d7e9daca4..bea1233ee8 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoCropView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoCropView.m @@ -5,7 +5,7 @@ #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoDrawingController.h b/submodules/LegacyComponents/Sources/TGPhotoDrawingController.h index 47b1695364..3597b8661c 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoDrawingController.h +++ b/submodules/LegacyComponents/Sources/TGPhotoDrawingController.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorTabController.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoDrawingController.m b/submodules/LegacyComponents/Sources/TGPhotoDrawingController.m index fe26e7f2b1..908cf60861 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoDrawingController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoDrawingController.m @@ -1,3 +1,4 @@ +#import #import "TGPhotoDrawingController.h" #import "LegacyComponentsInternal.h" @@ -7,7 +8,7 @@ #import #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import @@ -19,7 +20,7 @@ #import #import "TGPaintingWrapperView.h" -#import "TGPhotoEditorSparseView.h" +#import #import "PGPhotoEditor.h" #import "TGPhotoEditorPreviewView.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurAreaView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurAreaView.h index caebc2a3c4..62aee656db 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurAreaView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurAreaView.h @@ -1,6 +1,6 @@ #import #import "PGPhotoEditorItem.h" -#import "TGPhotoEditorToolView.h" +#import @interface TGPhotoEditorBlurAreaView : UIView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.h index 09be2808c9..6eb5e9dd3d 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorToolView.h" +#import #import "PGPhotoEditorItem.h" @interface TGPhotoEditorBlurToolView : UIView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.m index 331e050725..c85605aee8 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurToolView.m @@ -1,13 +1,13 @@ #import "TGPhotoEditorBlurToolView.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" +#import +#import #import "TGPhotoEditorBlurTypeButton.h" -#import "TGPhotoEditorSliderView.h" +#import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import "PGBlurTool.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurTypeButton.m b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurTypeButton.m index cb74b72a2a..4dd177afc9 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorBlurTypeButton.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorBlurTypeButton.m @@ -1,6 +1,6 @@ #import "TGPhotoEditorBlurTypeButton.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import @interface TGPhotoEditorBlurTypeButton () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorButton.m b/submodules/LegacyComponents/Sources/TGPhotoEditorButton.m index f944b7efee..354dc6d520 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorButton.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorButton.m @@ -1,9 +1,9 @@ -#import "TGPhotoEditorButton.h" +#import #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import @interface TGPhotoEditorButton () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorCollectionView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorCollectionView.m index bcd4c64165..3e533fb142 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorCollectionView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorCollectionView.m @@ -4,7 +4,7 @@ #import "TGPhotoToolCell.h" -#import "TGPhotoEditorSliderView.h" +#import const CGPoint TGPhotoEditorEdgeScrollTriggerOffset = { 100, 150 }; diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorController.m b/submodules/LegacyComponents/Sources/TGPhotoEditorController.m index 72bfc3cc6d..f61c9a9f19 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorController.m @@ -1,4 +1,5 @@ -#import "TGPhotoEditorController.h" +#import +#import #import "LegacyComponentsInternal.h" @@ -7,13 +8,13 @@ #import #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import #import -#import "TGProgressWindow.h" +#import #import "PGPhotoEditor.h" #import "PGPhotoEditorView.h" @@ -25,7 +26,7 @@ #import #import -#import "TGPhotoToolbarView.h" +#import #import "TGPhotoEditorPreviewView.h" #import @@ -39,16 +40,16 @@ #import "TGPhotoQualityController.h" #import "TGPhotoAvatarPreviewController.h" -#import "TGPhotoAvatarCropView.h" +#import -#import "TGMessageImageViewOverlayView.h" +#import #import "TGMediaPickerGalleryVideoScrubber.h" #import "TGMediaPickerGalleryVideoScrubberThumbnailView.h" -#import "TGMenuSheetController.h" +#import #import -#import "TGCameraCapturedVideo.h" +#import @interface TGPhotoEditorController () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.h index ca1676601b..5059b93d2b 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorToolView.h" +#import #import "PGPhotoEditorItem.h" @interface TGPhotoEditorCurvesHistogramView : UIView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.m index 230279e363..48aba4848b 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesHistogramView.m @@ -1,3 +1,4 @@ +#import #import "TGPhotoEditorCurvesHistogramView.h" #import "LegacyComponentsInternal.h" @@ -9,10 +10,10 @@ #import "PGPhotoHistogram.h" #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "TGHistogramView.h" -#import "TGPhotoEditorTabController.h" +#import #import "TGPhotoEditorToolButtonsView.h" @interface TGPhotoEditorCurvesHistogramView () diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.h index 2bbadedf42..ae661067c4 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorToolView.h" +#import #import "PGPhotoEditorItem.h" #import "PGCurvesTool.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.m index 6da9a4b081..d38e42b6dc 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorCurvesToolView.m @@ -1,8 +1,8 @@ #import "TGPhotoEditorCurvesToolView.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import typedef enum { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.h index 7612ea89be..eb2db5e314 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorToolView.h" +#import #import "PGPhotoEditorItem.h" @interface TGPhotoEditorGenericToolView : UIView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.m index 4b5ad1d166..e8df9b21fb 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorGenericToolView.m @@ -3,9 +3,9 @@ #import "LegacyComponentsInternal.h" #import -#import "TGPhotoEditorInterfaceAssets.h" +#import -#import "TGPhotoEditorSliderView.h" +#import @interface TGPhotoEditorGenericToolView () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorHUDView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorHUDView.m index f8b7f74300..968a584b8c 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorHUDView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorHUDView.m @@ -1,9 +1,9 @@ #import "TGPhotoEditorHUDView.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" +#import -#import "TGPhotoEditorInterfaceAssets.h" +#import @interface TGPhotoEditorHUDView () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorInterfaceAssets.m b/submodules/LegacyComponents/Sources/TGPhotoEditorInterfaceAssets.m index 0feeb77108..9ab2a97410 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorInterfaceAssets.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorInterfaceAssets.m @@ -1,10 +1,10 @@ -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "TGFont.h" +#import +#import -#import "TGMediaAssetsController.h" +#import @implementation TGPhotoEditorInterfaceAssets diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m index 4e2e5d3131..7fbf77fdcb 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorSliderView.m @@ -1,8 +1,8 @@ -#import "TGPhotoEditorSliderView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import const CGFloat TGPhotoEditorSliderViewLineSize = 3.0f; const CGFloat TGPhotoEditorSliderViewMargin = 15.0f; diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorSparseView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorSparseView.m index bbb58c0751..05e24df0ba 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorSparseView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorSparseView.m @@ -1,4 +1,4 @@ -#import "TGPhotoEditorSparseView.h" +#import @implementation TGPhotoEditorSparseView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorTabController.m b/submodules/LegacyComponents/Sources/TGPhotoEditorTabController.m index a54c7c0792..fd25d31b13 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorTabController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorTabController.m @@ -1,15 +1,15 @@ -#import "TGPhotoEditorTabController.h" +#import #import "LegacyComponentsInternal.h" #import -#import "TGPhotoEditorController.h" +#import #import #import "TGPhotoEditorPreviewView.h" -#import "TGPhotoToolbarView.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorTintSwatchView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorTintSwatchView.m index c7399997d1..85e1d20f60 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorTintSwatchView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorTintSwatchView.m @@ -1,5 +1,5 @@ #import "TGPhotoEditorTintSwatchView.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import const CGFloat TGPhotoEditorTintSwatchRadius = 9.0f; const CGFloat TGPhotoEditorTintSwatchSelectedRadius = 9.0f; diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.h b/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.h index 871f64ccc4..50c6f321a6 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorToolView.h" +#import #import "PGPhotoEditorItem.h" @interface TGPhotoEditorTintToolView : UIView diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.m index 10267b8c5f..0c9d301139 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorTintToolView.m @@ -1,14 +1,14 @@ #import "TGPhotoEditorTintToolView.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import #import "TGPhotoEditorTintSwatchView.h" -#import "TGPhotoEditorSliderView.h" +#import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import "PGTintTool.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorToolButtonsView.m b/submodules/LegacyComponents/Sources/TGPhotoEditorToolButtonsView.m index 6fa8aaf7c2..ec10163fc8 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorToolButtonsView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorToolButtonsView.m @@ -1,12 +1,12 @@ #import "TGPhotoEditorToolButtonsView.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import -#import "TGPhotoEditorInterfaceAssets.h" +#import -#import "TGModernButton.h" +#import const CGFloat TGPhotoEditorToolButtonsViewSize = 53; diff --git a/submodules/LegacyComponents/Sources/TGPhotoEditorUtils.m b/submodules/LegacyComponents/Sources/TGPhotoEditorUtils.m index c1d40d2075..70d4200b90 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoEditorUtils.m +++ b/submodules/LegacyComponents/Sources/TGPhotoEditorUtils.m @@ -1,7 +1,7 @@ -#import "TGPhotoEditorUtils.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoMaskPosition.m b/submodules/LegacyComponents/Sources/TGPhotoMaskPosition.m index 805ad9fcfe..e510723979 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoMaskPosition.m +++ b/submodules/LegacyComponents/Sources/TGPhotoMaskPosition.m @@ -1,7 +1,7 @@ -#import "TGPhotoMaskPosition.h" +#import #import "LegacyComponentsInternal.h" -#import "TGDocumentAttributeSticker.h" +#import @implementation TGPhotoMaskPosition diff --git a/submodules/LegacyComponents/Sources/TGPhotoQualityController.h b/submodules/LegacyComponents/Sources/TGPhotoQualityController.h index 0a33e72154..d201be5331 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoQualityController.h +++ b/submodules/LegacyComponents/Sources/TGPhotoQualityController.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorTabController.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGPhotoQualityController.m b/submodules/LegacyComponents/Sources/TGPhotoQualityController.m index f997ba0a1f..1bb66dbaf1 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoQualityController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoQualityController.m @@ -1,10 +1,11 @@ +#import #import "TGPhotoQualityController.h" #import "LegacyComponentsInternal.h" #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import #import @@ -14,10 +15,10 @@ #import #import #import -#import "TGCameraCapturedVideo.h" +#import #import "TGPaintingWrapperView.h" -#import "TGMessageImageViewOverlayView.h" +#import #import "PGPhotoEditor.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoRectangleCropController.h b/submodules/LegacyComponents/Sources/TGPhotoRectangleCropController.h index 3df2af9dd5..e92c487157 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoRectangleCropController.h +++ b/submodules/LegacyComponents/Sources/TGPhotoRectangleCropController.h @@ -1,4 +1,4 @@ -#import "TGPhotoEditorTabController.h" +#import @interface TGPhotoRectangleCropController : TGPhotoEditorTabController diff --git a/submodules/LegacyComponents/Sources/TGPhotoToolCell.m b/submodules/LegacyComponents/Sources/TGPhotoToolCell.m index 9147522e4e..3d7b9bbc52 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoToolCell.m +++ b/submodules/LegacyComponents/Sources/TGPhotoToolCell.m @@ -3,7 +3,7 @@ #import "PGPhotoTool.h" #import "TGPhotoEditorGenericToolView.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import NSString * const TGPhotoToolCellKind = @"TGPhotoToolCellKind"; diff --git a/submodules/LegacyComponents/Sources/TGPhotoToolbarView.m b/submodules/LegacyComponents/Sources/TGPhotoToolbarView.m index 2069a92037..8b519b5860 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoToolbarView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoToolbarView.m @@ -1,16 +1,16 @@ -#import "TGPhotoToolbarView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import -#import "TGModernButton.h" -#import "TGPhotoEditorButton.h" -#import "TGPhotoEditorInterfaceAssets.h" +#import +#import +#import -#import "TGMediaAssetsController.h" +#import -#import "TGPhotoPaintStickersContext.h" +#import @interface TGPhotoToolbarView () { diff --git a/submodules/LegacyComponents/Sources/TGPhotoToolsController.m b/submodules/LegacyComponents/Sources/TGPhotoToolsController.m index 6956c9ab0f..61862ef38e 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoToolsController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoToolsController.m @@ -1,14 +1,16 @@ +#import + #import "TGPhotoToolsController.h" #import "LegacyComponentsInternal.h" #import -#import "TGPhotoEditorInterfaceAssets.h" +#import #import "TGPhotoEditorCollectionView.h" #import "TGPhotoToolCell.h" #import -#import "UICollectionView+Utils.h" +#import #import #import "PGPhotoEditor.h" @@ -18,10 +20,10 @@ #import "PGTintTool.h" #import -#import "TGPhotoEditorController.h" +#import #import "TGPhotoEditorPreviewView.h" #import "TGPhotoEditorHUDView.h" -#import "TGPhotoEditorSparseView.h" +#import #import "TGPhotoDrawingController.h" diff --git a/submodules/LegacyComponents/Sources/TGPhotoVideoEditor.m b/submodules/LegacyComponents/Sources/TGPhotoVideoEditor.m index 14af60512a..6a2f8dc124 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoVideoEditor.m +++ b/submodules/LegacyComponents/Sources/TGPhotoVideoEditor.m @@ -1,12 +1,13 @@ -#import "TGPhotoVideoEditor.h" +#import +#import -#import "TGMediaEditingContext.h" +#import -#import "TGMediaPickerGalleryModel.h" -#import "TGMediaPickerGalleryPhotoItem.h" -#import "TGMediaPickerGalleryVideoItem.h" +#import +#import +#import -#import "TGMediaPickerGalleryVideoItemView.h" +#import #import "LegacyComponentsInternal.h" @@ -315,10 +316,8 @@ editorController.beginTransitionOut = ^UIView *(CGRect *referenceFrame, UIView **parentView, bool saving) { - CGRect startFrame = CGRectZero; if (referenceFrame != NULL) { - startFrame = *referenceFrame; *referenceFrame = fromRect; *parentView = referenceView.superview; } diff --git a/submodules/LegacyComponents/Sources/TGPluralization.m b/submodules/LegacyComponents/Sources/TGPluralization.m index 4dc05aec79..371fad5b94 100644 --- a/submodules/LegacyComponents/Sources/TGPluralization.m +++ b/submodules/LegacyComponents/Sources/TGPluralization.m @@ -1,4 +1,4 @@ -#import "TGPluralization.h" +#import TGPluralFormValue TGPluralForm(unsigned int lc, int n) { switch (lc) { diff --git a/submodules/LegacyComponents/Sources/TGProgressSpinnerView.m b/submodules/LegacyComponents/Sources/TGProgressSpinnerView.m index d587a09df9..1869c798a2 100644 --- a/submodules/LegacyComponents/Sources/TGProgressSpinnerView.m +++ b/submodules/LegacyComponents/Sources/TGProgressSpinnerView.m @@ -1,4 +1,4 @@ -#import "TGProgressSpinnerView.h" +#import #import "LegacyComponentsInternal.h" diff --git a/submodules/LegacyComponents/Sources/TGProgressWindow.m b/submodules/LegacyComponents/Sources/TGProgressWindow.m index 09e78ad1d1..697740d8ce 100644 --- a/submodules/LegacyComponents/Sources/TGProgressWindow.m +++ b/submodules/LegacyComponents/Sources/TGProgressWindow.m @@ -1,8 +1,8 @@ -#import "TGProgressWindow.h" +#import #import "LegacyComponentsInternal.h" -#import "TGProgressSpinnerView.h" +#import static bool TGProgressWindowIsLight = true; diff --git a/submodules/LegacyComponents/Sources/TGProxyWindow.m b/submodules/LegacyComponents/Sources/TGProxyWindow.m index 1f78db1432..d9ae59d562 100644 --- a/submodules/LegacyComponents/Sources/TGProxyWindow.m +++ b/submodules/LegacyComponents/Sources/TGProxyWindow.m @@ -1,8 +1,8 @@ -#import "TGProxyWindow.h" +#import #import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import static UIImage *generateShieldImage(UIColor *color) { NSString *code = @"M100,6.56393754 L6,48.2657557 L6,110.909091 C6,169.509174 46.3678836,223.966692 100,237.814087 C153.632116,223.966692 194,169.509174 194,110.909091 L194,48.2657557 L100,6.56393754 S"; diff --git a/submodules/LegacyComponents/Sources/TGRTLScreenEdgePanGestureRecognizer.m b/submodules/LegacyComponents/Sources/TGRTLScreenEdgePanGestureRecognizer.m index 1b4df123cc..cc92d5f739 100644 --- a/submodules/LegacyComponents/Sources/TGRTLScreenEdgePanGestureRecognizer.m +++ b/submodules/LegacyComponents/Sources/TGRTLScreenEdgePanGestureRecognizer.m @@ -1,6 +1,6 @@ -#import "TGRTLScreenEdgePanGestureRecognizer.h" +#import -#import "Freedom.h" +#import @implementation TGRTLScreenEdgePanGestureRecognizer diff --git a/submodules/LegacyComponents/Sources/TGReplyMarkupAttachment.m b/submodules/LegacyComponents/Sources/TGReplyMarkupAttachment.m index 77498f46da..c3caa5d5c7 100644 --- a/submodules/LegacyComponents/Sources/TGReplyMarkupAttachment.m +++ b/submodules/LegacyComponents/Sources/TGReplyMarkupAttachment.m @@ -1,11 +1,11 @@ -#import "TGReplyMarkupAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import -#import "NSInputStream+TL.h" +#import @implementation TGReplyMarkupAttachment @@ -56,7 +56,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]; @@ -66,7 +66,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 diff --git a/submodules/LegacyComponents/Sources/TGReplyMessageMediaAttachment.m b/submodules/LegacyComponents/Sources/TGReplyMessageMediaAttachment.m index dffa6772ba..d80646376e 100644 --- a/submodules/LegacyComponents/Sources/TGReplyMessageMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGReplyMessageMediaAttachment.m @@ -1,9 +1,9 @@ -#import "TGReplyMessageMediaAttachment.h" +#import -#import "TGMessage.h" +#import -#import "PSKeyValueDecoder.h" -#import "PSKeyValueEncoder.h" +#import +#import @implementation TGReplyMessageMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGSecretTimerMenu.m b/submodules/LegacyComponents/Sources/TGSecretTimerMenu.m index 1398251a35..0a7364dd6e 100644 --- a/submodules/LegacyComponents/Sources/TGSecretTimerMenu.m +++ b/submodules/LegacyComponents/Sources/TGSecretTimerMenu.m @@ -1,11 +1,11 @@ -#import "TGSecretTimerMenu.h" +#import #import "LegacyComponentsInternal.h" -#import "TGMenuSheetController.h" +#import -#import "TGMenuSheetTitleItemView.h" -#import "TGMenuSheetButtonItemView.h" +#import +#import #import "TGSecretTimerPickerItemView.h" @implementation TGSecretTimerMenu diff --git a/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.h b/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.h index 6523855287..c5ea9d8120 100644 --- a/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.h +++ b/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.h @@ -1,4 +1,4 @@ -#import "TGMenuSheetItemView.h" +#import @interface TGSecretTimerPickerItemView : TGMenuSheetItemView diff --git a/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.m b/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.m index 51e80b350e..c3bbf647c9 100644 --- a/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.m +++ b/submodules/LegacyComponents/Sources/TGSecretTimerPickerItemView.m @@ -4,7 +4,7 @@ #import "TGSecretTimerValueControllerItemView.h" -#import "TGMenuSheetController.h" +#import @interface TGSecretTimerPickerView : UIPickerView diff --git a/submodules/LegacyComponents/Sources/TGSecretTimerValueController.h b/submodules/LegacyComponents/Sources/TGSecretTimerValueController.h index b53effd99c..ffbedf41f0 100644 --- a/submodules/LegacyComponents/Sources/TGSecretTimerValueController.h +++ b/submodules/LegacyComponents/Sources/TGSecretTimerValueController.h @@ -1,4 +1,4 @@ -#import +#import @interface TGSecretTimerValueController : TGViewController diff --git a/submodules/LegacyComponents/Sources/TGSecretTimerValueControllerItemView.m b/submodules/LegacyComponents/Sources/TGSecretTimerValueControllerItemView.m index b6d2f00f1d..7ab737b114 100644 --- a/submodules/LegacyComponents/Sources/TGSecretTimerValueControllerItemView.m +++ b/submodules/LegacyComponents/Sources/TGSecretTimerValueControllerItemView.m @@ -1,8 +1,8 @@ #import "TGSecretTimerValueControllerItemView.h" #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGStringUtils.h" +#import +#import @interface TGSecretTimerValueControllerItemView () { diff --git a/submodules/LegacyComponents/Sources/TGStaticBackdropAreaData.m b/submodules/LegacyComponents/Sources/TGStaticBackdropAreaData.m index 1467de1ba7..b9f2370114 100644 --- a/submodules/LegacyComponents/Sources/TGStaticBackdropAreaData.m +++ b/submodules/LegacyComponents/Sources/TGStaticBackdropAreaData.m @@ -1,4 +1,4 @@ -#import "TGStaticBackdropAreaData.h" +#import @implementation TGStaticBackdropAreaData diff --git a/submodules/LegacyComponents/Sources/TGStaticBackdropImageData.m b/submodules/LegacyComponents/Sources/TGStaticBackdropImageData.m index f16732a244..f53d02f742 100644 --- a/submodules/LegacyComponents/Sources/TGStaticBackdropImageData.m +++ b/submodules/LegacyComponents/Sources/TGStaticBackdropImageData.m @@ -1,4 +1,4 @@ -#import "TGStaticBackdropImageData.h" +#import NSString *TGStaticBackdropMessageActionCircle = @"TGStaticBackdropMessageActionCircle"; NSString *TGStaticBackdropMessageTimestamp = @"TGStaticBackdropMessageTimestamp"; diff --git a/submodules/LegacyComponents/Sources/TGStickerAssociation.m b/submodules/LegacyComponents/Sources/TGStickerAssociation.m index 4d6870c96f..b842da330b 100644 --- a/submodules/LegacyComponents/Sources/TGStickerAssociation.m +++ b/submodules/LegacyComponents/Sources/TGStickerAssociation.m @@ -1,7 +1,7 @@ -#import "TGStickerAssociation.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGStickerAssociation diff --git a/submodules/LegacyComponents/Sources/TGStickerPack.m b/submodules/LegacyComponents/Sources/TGStickerPack.m index 2ff7e8a2d5..be4382c85c 100644 --- a/submodules/LegacyComponents/Sources/TGStickerPack.m +++ b/submodules/LegacyComponents/Sources/TGStickerPack.m @@ -1,4 +1,4 @@ -#import "TGStickerPack.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGStickerPackReference.m b/submodules/LegacyComponents/Sources/TGStickerPackReference.m index 14e41d61d3..65a461bc6a 100644 --- a/submodules/LegacyComponents/Sources/TGStickerPackReference.m +++ b/submodules/LegacyComponents/Sources/TGStickerPackReference.m @@ -1,8 +1,8 @@ -#import "TGStickerPackReference.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueCoder.h" +#import @implementation TGStickerPackBuiltinReference diff --git a/submodules/LegacyComponents/Sources/TGStringUtils.mm b/submodules/LegacyComponents/Sources/TGStringUtils.mm index 872fdd1411..daa796e70d 100644 --- a/submodules/LegacyComponents/Sources/TGStringUtils.mm +++ b/submodules/LegacyComponents/Sources/TGStringUtils.mm @@ -1,11 +1,11 @@ -#import "TGStringUtils.h" +#import #import "LegacyComponentsInternal.h" #import -#import "TGLocalization.h" -#import "TGPluralization.h" +#import +#import typedef struct { __unsafe_unretained NSString *escapeSequence; @@ -487,7 +487,10 @@ static HTMLEscapeMap gAsciiHTMLEscapeMap[] = { const char *ptr = [string UTF8String]; unsigned char md5Buffer[16]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5(ptr, (CC_LONG)[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding], md5Buffer); +#pragma clang diagnostic pop NSString *output = [[NSString alloc] initWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", md5Buffer[0], md5Buffer[1], md5Buffer[2], md5Buffer[3], md5Buffer[4], md5Buffer[5], md5Buffer[6], md5Buffer[7], md5Buffer[8], md5Buffer[9], md5Buffer[10], md5Buffer[11], md5Buffer[12], md5Buffer[13], md5Buffer[14], md5Buffer[15]]; //objc_setAssociatedObject(string, md5PropertyKey, output, OBJC_ASSOCIATION_RETAIN_NONATOMIC); return output; @@ -495,7 +498,10 @@ static HTMLEscapeMap gAsciiHTMLEscapeMap[] = { + (NSString *)md5ForData:(NSData *)data { unsigned char md5Buffer[16]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5(data.bytes, (CC_LONG)data.length, md5Buffer); +#pragma clang diagnostic pop NSString *output = [[NSString alloc] initWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", md5Buffer[0], md5Buffer[1], md5Buffer[2], md5Buffer[3], md5Buffer[4], md5Buffer[5], md5Buffer[6], md5Buffer[7], md5Buffer[8], md5Buffer[9], md5Buffer[10], md5Buffer[11], md5Buffer[12], md5Buffer[13], md5Buffer[14], md5Buffer[15]]; return output; } diff --git a/submodules/LegacyComponents/Sources/TGTextCheckingResult.m b/submodules/LegacyComponents/Sources/TGTextCheckingResult.m index d69e158320..5e314e0af6 100644 --- a/submodules/LegacyComponents/Sources/TGTextCheckingResult.m +++ b/submodules/LegacyComponents/Sources/TGTextCheckingResult.m @@ -1,4 +1,4 @@ -#import "TGTextCheckingResult.h" +#import @implementation TGTextCheckingResult diff --git a/submodules/LegacyComponents/Sources/TGTextField.m b/submodules/LegacyComponents/Sources/TGTextField.m index 1f5a5d67b4..2388ceb511 100644 --- a/submodules/LegacyComponents/Sources/TGTextField.m +++ b/submodules/LegacyComponents/Sources/TGTextField.m @@ -1,7 +1,7 @@ -#import "TGTextField.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import @implementation TGTextField diff --git a/submodules/LegacyComponents/Sources/TGTimerTarget.m b/submodules/LegacyComponents/Sources/TGTimerTarget.m index dce40fe83d..b51dd9507b 100644 --- a/submodules/LegacyComponents/Sources/TGTimerTarget.m +++ b/submodules/LegacyComponents/Sources/TGTimerTarget.m @@ -1,4 +1,4 @@ -#import "TGTimerTarget.h" +#import @implementation TGTimerTarget diff --git a/submodules/LegacyComponents/Sources/TGToolbarButton.m b/submodules/LegacyComponents/Sources/TGToolbarButton.m index ffa886ec80..090a7353bc 100644 --- a/submodules/LegacyComponents/Sources/TGToolbarButton.m +++ b/submodules/LegacyComponents/Sources/TGToolbarButton.m @@ -1,7 +1,7 @@ -#import "TGToolbarButton.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import static UIImage *backgroundBack() { diff --git a/submodules/LegacyComponents/Sources/TGTooltipView.m b/submodules/LegacyComponents/Sources/TGTooltipView.m index 9c9e3c23c6..fd0b1a486f 100644 --- a/submodules/LegacyComponents/Sources/TGTooltipView.m +++ b/submodules/LegacyComponents/Sources/TGTooltipView.m @@ -1,8 +1,8 @@ -#import "TGTooltipView.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" +#import +#import #import diff --git a/submodules/LegacyComponents/Sources/TGUnsupportedMediaAttachment.m b/submodules/LegacyComponents/Sources/TGUnsupportedMediaAttachment.m index fcb6cad9d0..95536b2804 100644 --- a/submodules/LegacyComponents/Sources/TGUnsupportedMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGUnsupportedMediaAttachment.m @@ -1,4 +1,4 @@ -#import "TGUnsupportedMediaAttachment.h" +#import @implementation TGUnsupportedMediaAttachment diff --git a/submodules/LegacyComponents/Sources/TGViaUserAttachment.m b/submodules/LegacyComponents/Sources/TGViaUserAttachment.m index f0d940bd8b..25cd60cb4a 100644 --- a/submodules/LegacyComponents/Sources/TGViaUserAttachment.m +++ b/submodules/LegacyComponents/Sources/TGViaUserAttachment.m @@ -1,6 +1,6 @@ -#import "TGViaUserAttachment.h" +#import -#import "NSInputStream+TL.h" +#import @implementation TGViaUserAttachment @@ -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 diff --git a/submodules/LegacyComponents/Sources/TGVideoCameraGLRenderer.m b/submodules/LegacyComponents/Sources/TGVideoCameraGLRenderer.m index e4c58c03aa..603d82cd83 100644 --- a/submodules/LegacyComponents/Sources/TGVideoCameraGLRenderer.m +++ b/submodules/LegacyComponents/Sources/TGVideoCameraGLRenderer.m @@ -1,4 +1,4 @@ -#import "TGVideoCameraGLRenderer.h" +#import #import #import diff --git a/submodules/LegacyComponents/Sources/TGVideoCameraGLView.m b/submodules/LegacyComponents/Sources/TGVideoCameraGLView.m index 4d12955387..da58b96b90 100644 --- a/submodules/LegacyComponents/Sources/TGVideoCameraGLView.m +++ b/submodules/LegacyComponents/Sources/TGVideoCameraGLView.m @@ -1,4 +1,4 @@ -#import "TGVideoCameraGLView.h" +#import #import #import #import @@ -8,6 +8,9 @@ #import "LegacyComponentsInternal.h" #import "TGVideoCameraPipeline.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + @interface TGVideoCameraGLView () { EAGLContext *_context; @@ -230,3 +233,5 @@ bail: } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/TGVideoCameraMovieRecorder.m b/submodules/LegacyComponents/Sources/TGVideoCameraMovieRecorder.m index 281c325ada..5be73756b3 100644 --- a/submodules/LegacyComponents/Sources/TGVideoCameraMovieRecorder.m +++ b/submodules/LegacyComponents/Sources/TGVideoCameraMovieRecorder.m @@ -1,4 +1,4 @@ -#import "TGVideoCameraMovieRecorder.h" +#import #import #import "TGVideoCameraPipeline.h" diff --git a/submodules/LegacyComponents/Sources/TGVideoCameraPipeline.m b/submodules/LegacyComponents/Sources/TGVideoCameraPipeline.m index 58609f8d2f..5afa14bbe8 100644 --- a/submodules/LegacyComponents/Sources/TGVideoCameraPipeline.m +++ b/submodules/LegacyComponents/Sources/TGVideoCameraPipeline.m @@ -172,7 +172,10 @@ const NSInteger TGVideoCameraRetainedBufferCount = 16; _audioConnection = [_audioOutput connectionWithMediaType:AVMediaTypeAudio]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; +#pragma clang diagnostic pop AVCaptureDevice *videoDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; for (AVCaptureDevice *device in devices) { @@ -921,7 +924,10 @@ static CGFloat angleOffsetFromPortraitOrientationToOrientation(AVCaptureVideoOri { NSError *error; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; +#pragma clang diagnostic pop AVCaptureDevice *deviceForTargetPosition = nil; for (AVCaptureDevice *device in devices) { @@ -1058,7 +1064,10 @@ static CGFloat angleOffsetFromPortraitOrientationToOrientation(AVCaptureVideoOri + (bool)cameraPositionChangeAvailable { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo].count > 1; +#pragma clang diagnostic pop } + (SQueue *)cameraQueue diff --git a/submodules/LegacyComponents/Sources/TGVideoEditAdjustments.m b/submodules/LegacyComponents/Sources/TGVideoEditAdjustments.m index ffa4c1eb68..39232a34e1 100644 --- a/submodules/LegacyComponents/Sources/TGVideoEditAdjustments.m +++ b/submodules/LegacyComponents/Sources/TGVideoEditAdjustments.m @@ -1,13 +1,13 @@ -#import "TGVideoEditAdjustments.h" +#import -#import "TGPhotoEditorUtils.h" +#import -#import "TGPaintingData.h" +#import -#import "PGPhotoEditorValues.h" +#import -#import "TGPhotoPaintStickerEntity.h" -#import "TGPhotoPaintTextEntity.h" +#import +#import #import "PGTintTool.h" #import "PGCurvesTool.h" diff --git a/submodules/LegacyComponents/Sources/TGVideoInfo.mm b/submodules/LegacyComponents/Sources/TGVideoInfo.mm index 6db3e21c64..0326cd9a59 100644 --- a/submodules/LegacyComponents/Sources/TGVideoInfo.mm +++ b/submodules/LegacyComponents/Sources/TGVideoInfo.mm @@ -1,4 +1,4 @@ -#import "TGVideoInfo.h" +#import #include diff --git a/submodules/LegacyComponents/Sources/TGVideoMediaAttachment.m b/submodules/LegacyComponents/Sources/TGVideoMediaAttachment.m index 5caac18dc1..a16c0159cc 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGVideoMediaAttachment.m @@ -1,6 +1,6 @@ -#import "TGVideoMediaAttachment.h" +#import -#import "TGMessage.h" +#import #import "LegacyComponentsInternal.h" @@ -169,7 +169,7 @@ int32_t zero = 0; [data appendBytes:&zero length:4]; } else { - NSData *stickerData = [NSKeyedArchiver archivedDataWithRootObject:_embeddedStickerDocuments]; + NSData *stickerData = [NSKeyedArchiver archivedDataWithRootObject:_embeddedStickerDocuments requiringSecureCoding:false error:nil]; int32_t length = (int32_t)stickerData.length; [data appendBytes:&length length:4]; [data appendData:stickerData]; @@ -180,7 +180,7 @@ NSData *originData = nil; @try { - originData = [NSKeyedArchiver archivedDataWithRootObject:_originInfo]; + originData = [NSKeyedArchiver archivedDataWithRootObject:_originInfo requiringSecureCoding:false error:nil]; } @catch (NSException *e) { } @@ -269,7 +269,11 @@ uint8_t *stickerBytes = malloc(stickerDataLength); [is read:stickerBytes maxLength:stickerDataLength]; NSData *stickerData = [[NSData alloc] initWithBytesNoCopy:stickerBytes length:stickerDataLength freeWhenDone:true]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" videoAttachment.embeddedStickerDocuments = [NSKeyedUnarchiver unarchiveObjectWithData:stickerData]; +#pragma clang diagnostic pop } } @@ -291,7 +295,7 @@ NSData *data = [[NSData alloc] initWithBytesNoCopy:originBytes length:originLength freeWhenDone:true]; TGMediaOriginInfo *origin = nil; @try { - origin = [NSKeyedUnarchiver unarchiveObjectWithData:data]; + origin = [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaOriginInfo class] fromData:data error:nil]; } @catch (NSException *e) { } diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m b/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m index d05b594a21..3a410ff2d7 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m @@ -1,4 +1,4 @@ -#import "TGVideoMessageCaptureController.h" +#import #import "LegacyComponentsInternal.h" @@ -25,12 +25,15 @@ #import #import "TGColor.h" -#import "TGImageUtils.h" +#import -#import "TGMediaPickerSendActionSheetController.h" -#import "TGOverlayControllerWindow.h" +#import +#import #import +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + const NSTimeInterval TGVideoMessageMaximumDuration = 60.0; typedef enum @@ -1641,3 +1644,5 @@ static UIImage *startImage = nil; } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageControls.m b/submodules/LegacyComponents/Sources/TGVideoMessageControls.m index 8852e74a59..b6a6ed8a2e 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageControls.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageControls.m @@ -1,4 +1,4 @@ -#import "TGVideoMessageControls.h" +#import #import @@ -9,8 +9,8 @@ #import "LegacyComponentsInternal.h" #import "TGColor.h" -#import "TGModernConversationInputMicButton.h" -#import "TGVideoMessageCaptureController.h" +#import +#import static void setViewFrame(UIView *view, CGRect frame) { @@ -231,11 +231,8 @@ static CGRect viewFrame(UIView *view) [self removeDotAnimation]; NSTimeInterval durationFactor = MIN(0.4, MAX(1.0, velocity / 1000.0)); - int options = 0; - if (ABS(CFAbsoluteTimeGetCurrent() - _recordingInterfaceShowTime) < 0.2) { - options = UIViewAnimationOptionBeginFromCurrentState; } int animationCurveOption = iosMajorVersion() >= 7 ? (7 << 16) : 0; diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageRingView.m b/submodules/LegacyComponents/Sources/TGVideoMessageRingView.m index 38bf502dc5..d3d980a263 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageRingView.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageRingView.m @@ -1,4 +1,4 @@ -#import "TGVideoMessageRingView.h" +#import #import "TGColor.h" diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageScrubber.m b/submodules/LegacyComponents/Sources/TGVideoMessageScrubber.m index ced99d8dcf..b3c372a91f 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageScrubber.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageScrubber.m @@ -1,8 +1,8 @@ -#import "TGVideoMessageScrubber.h" +#import #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" -#import "POPBasicAnimation.h" +#import +#import #import @@ -11,7 +11,7 @@ #import "TGVideoMessageScrubberThumbnailView.h" #import "TGVideoMessageTrimView.h" -#import "TGModernConversationInputMicButton.h" +#import static const CGFloat TGVideoScrubberMinimumTrimDuration = 1.0f; static const CGFloat TGVideoScrubberTrimRectEpsilon = 3.0f; diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageScrubberThumbnailView.m b/submodules/LegacyComponents/Sources/TGVideoMessageScrubberThumbnailView.m index 816e939308..e3de941a7a 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageScrubberThumbnailView.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageScrubberThumbnailView.m @@ -1,7 +1,7 @@ #import "TGVideoMessageScrubberThumbnailView.h" #import "LegacyComponentsInternal.h" -#import "TGImageUtils.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/TGViewController+TGRecursiveEnumeration.m b/submodules/LegacyComponents/Sources/TGViewController+TGRecursiveEnumeration.m index 2097848f20..b918e4bd47 100644 --- a/submodules/LegacyComponents/Sources/TGViewController+TGRecursiveEnumeration.m +++ b/submodules/LegacyComponents/Sources/TGViewController+TGRecursiveEnumeration.m @@ -1,4 +1,4 @@ -#import "TGViewController+TGRecursiveEnumeration.h" +#import @implementation UIViewController (TGRecursiveEnumeration) diff --git a/submodules/LegacyComponents/Sources/TGViewController.mm b/submodules/LegacyComponents/Sources/TGViewController.mm index 6f286d4ca1..ba4d35769a 100644 --- a/submodules/LegacyComponents/Sources/TGViewController.mm +++ b/submodules/LegacyComponents/Sources/TGViewController.mm @@ -1,19 +1,22 @@ -#import "TGViewController.h" +#import #import "LegacyComponentsInternal.h" -#import "TGFont.h" -#import "TGImageUtils.h" -#import "Freedom.h" +#import +#import +#import -#import "TGNavigationController.h" -#import "TGOverlayControllerWindow.h" +#import +#import #import -#import "TGHacks.h" +#import #import +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + static __strong NSTimer *autorotationEnableTimer = nil; static bool autorotationDisabled = false; @@ -1543,3 +1546,5 @@ static id _defaultContext = nil; } @end + +#pragma clang diagnostic pop diff --git a/submodules/LegacyComponents/Sources/TGWeakDelegate.m b/submodules/LegacyComponents/Sources/TGWeakDelegate.m index a5df54efcb..40b23dc926 100644 --- a/submodules/LegacyComponents/Sources/TGWeakDelegate.m +++ b/submodules/LegacyComponents/Sources/TGWeakDelegate.m @@ -1,4 +1,4 @@ -#import "TGWeakDelegate.h" +#import @implementation TGWeakDelegate diff --git a/submodules/LegacyComponents/Sources/TGWebDocument.m b/submodules/LegacyComponents/Sources/TGWebDocument.m index c5e13250c5..979f89ff9c 100644 --- a/submodules/LegacyComponents/Sources/TGWebDocument.m +++ b/submodules/LegacyComponents/Sources/TGWebDocument.m @@ -1,9 +1,9 @@ -#import "TGWebDocument.h" +#import #import "LegacyComponentsInternal.h" -#import "PSKeyValueEncoder.h" -#import "PSKeyValueDecoder.h" +#import +#import @implementation TGWebDocumentReference diff --git a/submodules/LegacyComponents/Sources/TGWebPageMediaAttachment.m b/submodules/LegacyComponents/Sources/TGWebPageMediaAttachment.m index 1848dd8446..0b3848d453 100644 --- a/submodules/LegacyComponents/Sources/TGWebPageMediaAttachment.m +++ b/submodules/LegacyComponents/Sources/TGWebPageMediaAttachment.m @@ -1,8 +1,8 @@ -#import "TGWebPageMediaAttachment.h" +#import #import "LegacyComponentsInternal.h" -#import "NSInputStream+TL.h" +#import @implementation TGWebPageMediaAttachment @@ -149,7 +149,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]; @@ -160,7 +160,7 @@ int32_t length = [is readInt32]; NSData *data = [is readData:length]; @try { - return [NSKeyedUnarchiver unarchiveObjectWithData:data]; + return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGWebPageMediaAttachment class] fromData:data error:nil]; } @catch (NSException *e) { } return nil; diff --git a/submodules/LegacyComponents/Sources/UICollectionView+Utils.m b/submodules/LegacyComponents/Sources/UICollectionView+Utils.m index 473da3f228..5e28f022c5 100644 --- a/submodules/LegacyComponents/Sources/UICollectionView+Utils.m +++ b/submodules/LegacyComponents/Sources/UICollectionView+Utils.m @@ -1,4 +1,4 @@ -#import "UICollectionView+Utils.h" +#import @implementation UICollectionView (Utils) diff --git a/submodules/LegacyComponents/Sources/UIControl+HitTestEdgeInsets.m b/submodules/LegacyComponents/Sources/UIControl+HitTestEdgeInsets.m index 68ccf22da8..4697b95b8e 100644 --- a/submodules/LegacyComponents/Sources/UIControl+HitTestEdgeInsets.m +++ b/submodules/LegacyComponents/Sources/UIControl+HitTestEdgeInsets.m @@ -1,4 +1,4 @@ -#import "UIControl+HitTestEdgeInsets.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/UIImage+TG.m b/submodules/LegacyComponents/Sources/UIImage+TG.m index f6619ba861..00b5139af6 100644 --- a/submodules/LegacyComponents/Sources/UIImage+TG.m +++ b/submodules/LegacyComponents/Sources/UIImage+TG.m @@ -1,6 +1,6 @@ -#import "UIImage+TG.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/UIImage+TGMediaEditableItem.m b/submodules/LegacyComponents/Sources/UIImage+TGMediaEditableItem.m index 892f89eada..445af6e04e 100644 --- a/submodules/LegacyComponents/Sources/UIImage+TGMediaEditableItem.m +++ b/submodules/LegacyComponents/Sources/UIImage+TGMediaEditableItem.m @@ -1,4 +1,4 @@ -#import "UIImage+TGMediaEditableItem.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/UIScrollView+TGHacks.m b/submodules/LegacyComponents/Sources/UIScrollView+TGHacks.m index 20097b7da3..ba7d0763b5 100644 --- a/submodules/LegacyComponents/Sources/UIScrollView+TGHacks.m +++ b/submodules/LegacyComponents/Sources/UIScrollView+TGHacks.m @@ -1,4 +1,4 @@ -#import "UIScrollView+TGHacks.h" +#import #import diff --git a/submodules/LegacyComponents/Sources/mdb.c b/submodules/LegacyComponents/Sources/mdb.c index 10a8358449..7ce952ed32 100644 --- a/submodules/LegacyComponents/Sources/mdb.c +++ b/submodules/LegacyComponents/Sources/mdb.c @@ -136,7 +136,7 @@ #define MISALIGNED_OK 1 #endif -#include "lmdb.h" +#include #include "midl.h" #if (BYTE_ORDER == LITTLE_ENDIAN) == (BYTE_ORDER == BIG_ENDIAN)