diff --git a/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift b/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift index 52baa70a90..6a691bd2bb 100644 --- a/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift +++ b/submodules/ItemListStickerPackItem/Sources/ItemListStickerPackItem.swift @@ -457,9 +457,9 @@ class ItemListStickerPackItemNode: ItemListRevealOptionsItemNode { } if let editableControlSizeAndApply = editableControlSizeAndApply { - let editableControlFrame = CGRect(origin: CGPoint(x: params.leftInset + revealOffset, y: 0.0), size: CGSize(width: editableControlSizeAndApply.0, height: layout.size.height)) + let editableControlFrame = CGRect(origin: CGPoint(x: params.leftInset + revealOffset, y: 0.0), size: CGSize(width: editableControlSizeAndApply.0, height: layout.contentSize.height)) if strongSelf.editableControlNode == nil { - let editableControlNode = editableControlSizeAndApply.1(layout.size.height) + let editableControlNode = editableControlSizeAndApply.1(layout.contentSize.height) editableControlNode.tapped = { if let strongSelf = self { strongSelf.setRevealOptionsOpened(true, animated: true) diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h index a0611c83de..b40844fc8e 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponents.h @@ -259,8 +259,6 @@ #import #import #import -#import -#import #import #import #import diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchBar.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchBar.h deleted file mode 100644 index feab180b95..0000000000 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchBar.h +++ /dev/null @@ -1,94 +0,0 @@ -#import - -@class TGSearchBar; - -typedef enum { - TGSearchBarStyleDefault = 0, - TGSearchBarStyleDark = 1, - TGSearchBarStyleLight = 2, - TGSearchBarStyleLightPlain = 3, - TGSearchBarStyleLightAlwaysPlain = 4, - TGSearchBarStyleHeader = 5, - TGSearchBarStyleKeyboard = 6 -} TGSearchBarStyle; - -@protocol TGSearchBarDelegate - -- (void)searchBar:(TGSearchBar *)searchBar willChangeHeight:(CGFloat)newHeight; - -@end - -@interface TGSearchBarPallete : NSObject - -@property (nonatomic, readonly) bool isDark; -@property (nonatomic, readonly) UIColor *backgroundColor; -@property (nonatomic, readonly) UIColor *highContrastBackgroundColor; -@property (nonatomic, readonly) UIColor *textColor; -@property (nonatomic, readonly) UIColor *placeholderColor; -@property (nonatomic, readonly) UIImage *clearIcon; -@property (nonatomic, readonly) UIColor *barBackgroundColor; -@property (nonatomic, readonly) UIColor *barSeparatorColor; -@property (nonatomic, readonly) UIColor *plainBackgroundColor; -@property (nonatomic, readonly) UIColor *accentColor; -@property (nonatomic, readonly) UIColor *accentContrastColor; -@property (nonatomic, readonly) UIColor *menuBackgroundColor; -@property (nonatomic, readonly) UIImage *segmentedControlBackgroundImage; -@property (nonatomic, readonly) UIImage *segmentedControlSelectedImage; -@property (nonatomic, readonly) UIImage *segmentedControlHighlightedImage; -@property (nonatomic, readonly) UIImage *segmentedControlDividerImage; - -+ (instancetype)palleteWithDark:(bool)dark backgroundColor:(UIColor *)backgroundColor highContrastBackgroundColor:(UIColor *)highContrastBackgroundColor textColor:(UIColor *)textColor placeholderColor:(UIColor *)placeholderColor clearIcon:(UIImage *)clearIcon barBackgroundColor:(UIColor *)barBackgroundColor barSeparatorColor:(UIColor *)barSeparatorColor plainBackgroundColor:(UIColor *)plainBackgroundColor accentColor:(UIColor *)accentColor accentContrastColor:(UIColor *)accentContrastColor menuBackgroundColor:(UIColor *)menuBackgroundColor segmentedControlBackgroundImage:(UIImage *)segmentedControlBackgroundImage segmentedControlSelectedImage:(UIImage *)segmentedControlSelectedImage segmentedControlHighlightedImage:(UIImage *)segmentedControlHighlightedImage segmentedControlDividerImage:(UIImage *)segmentedControlDividerImage; - -@end - -@interface TGSearchBar : UIView - -+ (CGFloat)searchBarBaseHeight; -+ (CGFloat)searchBarScopeHeight; -- (CGFloat)baseHeight; - -@property (nonatomic, copy) void (^clearPrefix)(bool); - -@property (nonatomic, assign) UIEdgeInsets safeAreaInset; - -@property (nonatomic, weak) id delegate; -@property (nonatomic) bool highContrast; - -@property (nonatomic, strong) UITextField *customTextField; -@property (nonatomic, readonly) UITextField *maybeCustomTextField; - -@property (nonatomic, strong) UIImageView *customBackgroundView; -@property (nonatomic, strong) UIImageView *customActiveBackgroundView; - -@property (nonatomic, strong) NSArray *customScopeButtonTitles; -@property (nonatomic) NSInteger selectedScopeButtonIndex; -@property (nonatomic) bool showsScopeBar; -@property (nonatomic) bool scopeBarCollapsed; - -@property (nonatomic) bool searchBarShouldShowScopeControl; -@property (nonatomic) bool alwaysExtended; -@property (nonatomic) bool hidesCancelButton; - -@property (nonatomic, strong) UIButton *customCancelButton; - -@property (nonatomic) TGSearchBarStyle style; -@property (nonatomic, strong) NSString *text; -@property (nonatomic, strong) NSString *placeholder; -@property (nonatomic, strong) NSAttributedString *prefixText; - -@property (nonatomic) bool showActivity; -@property (nonatomic) bool delayActivity; - -- (instancetype)initWithFrame:(CGRect)frame style:(TGSearchBarStyle)style; - -- (void)setShowsCancelButton:(bool)showsCancelButton animated:(bool)animated; - -- (void)setCustomScopeBarHidden:(bool)hidden; - -- (void)updateClipping:(CGFloat)clippedHeight; - -- (void)localizationUpdated; - -- (void)setPallete:(TGSearchBarPallete *)pallete; - -@end diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchDisplayMixin.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchDisplayMixin.h deleted file mode 100644 index 18f042edf5..0000000000 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/TGSearchDisplayMixin.h +++ /dev/null @@ -1,46 +0,0 @@ -#import - -@class TGSearchDisplayMixin; -@class TGSearchBar; - -@protocol TGSearchDisplayMixinDelegate - -@required - -- (UITableView *)createTableViewForSearchMixin:(TGSearchDisplayMixin *)searchMixin; -- (UIView *)referenceViewForSearchResults; -- (void)searchMixin:(TGSearchDisplayMixin *)searchMixin hasChangedSearchQuery:(NSString *)searchQuery withScope:(int)scope; - -@optional - -- (void)searchMixinWillActivate:(bool)animated; -- (void)searchMixinWillDeactivate:(bool)animated; - -@end - -@interface TGSearchDisplayMixin : NSObject - -@property (nonatomic, weak) id delegate; - -@property (nonatomic, strong) TGSearchBar *searchBar; -@property (nonatomic) bool isActive; -@property (nonatomic, strong) UITableView *searchResultsTableView; -@property (nonatomic) bool alwaysShowsCancelButton; - -@property (nonatomic) bool searchResultsTableViewHidden; - -@property (nonatomic) bool simpleLayout; - -- (void)setSearchResultsTableViewHidden:(bool)searchResultsTableViewHidden animated:(bool)animated; - -- (void)setIsActive:(bool)isActive animated:(bool)animated; - -- (void)controllerInsetUpdated:(UIEdgeInsets)controllerInset; -- (void)controllerLayoutUpdated:(CGSize)layoutSize; - -- (void)reloadSearchResults; -- (void)resignResponderIfAny; - -- (void)unload; - -@end diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon.png deleted file mode 100644 index 4edffbcd9e..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@2x.png deleted file mode 100644 index daadae95df..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@3x.png deleted file mode 100644 index aca9c574b7..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentMenuInteractiveCameraIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentTipIcons@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentTipIcons@2x.png deleted file mode 100644 index eb05b2f187..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/AttachmentTipIcons@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutAccessory@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutAccessory@2x.png deleted file mode 100644 index 636dbe1100..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutAccessory@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow@2x.png deleted file mode 100644 index 710487e0db..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow_Highlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow_Highlighted@2x.png deleted file mode 100644 index ea5c91b128..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutArrow_Highlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground@2x.png deleted file mode 100644 index d30a7daf77..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground_Highlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground_Highlighted@2x.png deleted file mode 100644 index 72ed8be57d..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutBackground_Highlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground@2x.png deleted file mode 100644 index 1812b32a09..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground_Highlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground_Highlighted@2x.png deleted file mode 100644 index 2697187254..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingBackground_Highlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingIcon@2x.png deleted file mode 100644 index 6eb9fa6052..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CalloutDrivingIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CoubWatermark@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CoubWatermark@2x.png deleted file mode 100644 index 1a1078b4d8..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/CoubWatermark@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoFullScreenIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoFullScreenIcon@2x.png deleted file mode 100644 index 0ad54e3680..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoFullScreenIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPIPIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPIPIcon@2x.png deleted file mode 100644 index 9c6de4b160..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPIPIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPauseIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPauseIcon@2x.png deleted file mode 100644 index 54402daf4b..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPauseIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPlayIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPlayIcon@2x.png deleted file mode 100644 index f2a2e4422e..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoPlayIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoTrackHollow@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoTrackHollow@2x.png deleted file mode 100644 index 7b0f4e5a00..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/EmbedVideoTrackHollow@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/FoursquareAttribution@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/FoursquareAttribution@2x.png deleted file mode 100644 index 6b2650f7a3..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/FoursquareAttribution@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo.png deleted file mode 100644 index 5b1496cd6b..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@2x.png deleted file mode 100644 index 51f15f8690..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@3x.png deleted file mode 100644 index 16cdbcec81..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active.png deleted file mode 100644 index d8470628c4..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@2x.png deleted file mode 100644 index b2816988ca..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@3x.png deleted file mode 100644 index 6c8c87e511..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationInfo_Active@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@2x.png deleted file mode 100644 index 92170e69ac..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@3x.png deleted file mode 100644 index 40f071a3b0..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessageLiveIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@2x.png deleted file mode 100644 index 35384f6e1f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@3x.png deleted file mode 100644 index 5eeda02fa0..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinBackground@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@2x.png deleted file mode 100644 index cff797ee18..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@3x.png deleted file mode 100644 index 2c7603bb7d..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@2x.png deleted file mode 100644 index 709eb48ffe..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@3x.png deleted file mode 100644 index 38bf099fe4..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationMessagePinShadow@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@2x.png deleted file mode 100644 index d1dc083322..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@3x.png deleted file mode 100644 index 697e0d533e..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@2x.png deleted file mode 100644 index d85ebddd58..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@3x.png deleted file mode 100644 index 7b6345b8ad..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPanelEdge_Highlighted@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPin@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPin@2x.png deleted file mode 100644 index 709d3b08f9..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPin@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@2x.png deleted file mode 100644 index 6e2330dde7..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@3x.png deleted file mode 100644 index c99da533a0..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinBackground@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@2x.png deleted file mode 100644 index ab6fd29ccb..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@3x.png deleted file mode 100644 index a57e0d4252..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinPoint@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinPoint@2x.png deleted file mode 100644 index 7584de8b0f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinPoint@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@2x.png deleted file mode 100644 index 836010f30f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@3x.png deleted file mode 100644 index caffa8f166..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationPinShadow@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@2x.png deleted file mode 100644 index ae2064ea7c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@3x.png deleted file mode 100644 index 5baaa60ba9..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationSmallCircle@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@2x.png deleted file mode 100644 index 80c3ac5c2c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@3x.png deleted file mode 100644 index 6b3d6b0252..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationTopPanel@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationWave@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationWave@3x.png deleted file mode 100644 index 4819b3c862..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/LocationWave@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@2x.png deleted file mode 100644 index 4eaca6a590..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@3x.png deleted file mode 100644 index 5799af0f18..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernConversationAudioSlideToCancel@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@2x.png deleted file mode 100644 index 159b99f7c7..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@3x.png deleted file mode 100644 index 90b1d048b2..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlBackground@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@2x.png deleted file mode 100644 index fedfad1d89..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@3x.png deleted file mode 100644 index c165592d51..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlDivider@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@2x.png deleted file mode 100644 index 84fc7c3f7c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@3x.png deleted file mode 100644 index 5ea1fc964f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlHighlighted@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@2x.png deleted file mode 100644 index 4cd1da2062..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@3x.png deleted file mode 100644 index d3165fced5..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/ModernSegmentedControlSelected@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@2x.png deleted file mode 100644 index f7f8720e25..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@3x.png deleted file mode 100644 index 50e0696185..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintBrushIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintCheck@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintCheck@2x.png deleted file mode 100644 index 69d47f8abf..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintCheck@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@2x.png deleted file mode 100644 index 20d8c4f293..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@3x.png deleted file mode 100644 index 5b7b7e5bda..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintEraserIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@2x.png deleted file mode 100644 index e39a1d1dca..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@3x.png deleted file mode 100644 index 2c13f50e35..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintMirrorIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupCenterBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupCenterBackground@2x.png deleted file mode 100644 index 54f036c022..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupCenterBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeLeftBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeLeftBackground@2x.png deleted file mode 100644 index 1efe4aaf28..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeLeftBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeRightBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeRightBackground@2x.png deleted file mode 100644 index bf878ccb5f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupLandscapeRightBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupPortraitBackground@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupPortraitBackground@2x.png deleted file mode 100644 index 41cca8ef2f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintPopupPortraitBackground@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintRedoIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintRedoIcon@2x.png deleted file mode 100644 index 10be9f4ea8..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintRedoIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintSegmentedControlHighlighted@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintSegmentedControlHighlighted@2x.png deleted file mode 100644 index c975d225ae..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintSegmentedControlHighlighted@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@2x.png deleted file mode 100644 index d06e5f6b3c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@3x.png deleted file mode 100644 index 3d757b2e06..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintStickersIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@2x.png deleted file mode 100644 index 839068d0dc..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@3x.png deleted file mode 100644 index 3aceb45c60..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@2x.png deleted file mode 100644 index b890b20bca..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@3x.png deleted file mode 100644 index 364eb3d186..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintTextSettingsIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@2x.png deleted file mode 100644 index b371bf5377..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@3x.png deleted file mode 100644 index b6269a0892..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PaintUndoIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@2x.png deleted file mode 100644 index c1944b5f66..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@3x.png deleted file mode 100644 index e4c5bd9b29..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorAspectRatioIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@2x.png deleted file mode 100644 index 17b1e58928..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@3x.png deleted file mode 100644 index 0ff98548c3..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear.png deleted file mode 100644 index 1223538117..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@2x.png deleted file mode 100644 index e3f67c4449..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@3x.png deleted file mode 100644 index eb6279040c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurLinear@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff.png deleted file mode 100644 index 037d980c35..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@2x.png deleted file mode 100644 index 0dc203196e..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@3x.png deleted file mode 100644 index 1de339b991..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurOff@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial.png deleted file mode 100644 index f5903ed9ad..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@2x.png deleted file mode 100644 index e689c5f6fd..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@3x.png deleted file mode 100644 index a6601bfdb3..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorBlurRadial@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption.png deleted file mode 100644 index 1124711660..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@2x.png deleted file mode 100644 index 6ed8cb0d45..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@3x.png deleted file mode 100644 index 3c785a48c1..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCaption@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@2x.png deleted file mode 100644 index a6ed7807f2..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@3x.png deleted file mode 100644 index 1490c67dca..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCrop@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@2x.png deleted file mode 100644 index 568807854e..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@3x.png deleted file mode 100644 index 48ce0ee86f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorCurvesIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@2x.png deleted file mode 100644 index 2e10938f3d..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@3x.png deleted file mode 100644 index cbc638ee95..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGif@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@2x.png deleted file mode 100644 index 43c6612c0c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@3x.png deleted file mode 100644 index 9dca9739b5..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorGifShadow@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@2x.png deleted file mode 100644 index 41f3d9765d..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@3x.png deleted file mode 100644 index fb8c602ad1..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorPaint@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@2x.png deleted file mode 100644 index fff3a37e75..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@3x.png deleted file mode 100644 index 9e6e570152..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorQuality@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@2x.png deleted file mode 100644 index 87138622f8..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@3x.png deleted file mode 100644 index 133880fe7c..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintTool@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintTool@2x.png deleted file mode 100644 index fb64ec8327..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTintTool@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@2x.png deleted file mode 100644 index c814f6114a..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@3x.png deleted file mode 100644 index df1bb1879f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/PhotoEditorTools@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/RecordVideoIconOverlay@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/RecordVideoIconOverlay@3x.png deleted file mode 100644 index 7a571bb998..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/RecordVideoIconOverlay@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@2x.png deleted file mode 100644 index d30bef4955..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@3x.png deleted file mode 100644 index 64706d7681..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardFavoriteTab@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@2x.png deleted file mode 100644 index 382c35e033..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@3x.png deleted file mode 100644 index d760fa4947..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardGifIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@1x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@1x.png deleted file mode 100644 index b48545a8d7..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@1x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@2x.png deleted file mode 100644 index 95cc50e35f..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@3x.png deleted file mode 100644 index 045a394615..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardRecentTab@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@2x.png deleted file mode 100644 index d0dc89b9ff..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@3x.png deleted file mode 100644 index 54b04299e5..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardSettingsIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@2x.png deleted file mode 100644 index 67de340019..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@3x.png deleted file mode 100644 index ed14979353..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/StickerKeyboardTrendingIcon@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@2x.png deleted file mode 100644 index be5ecb85d3..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@3x.png deleted file mode 100644 index a365339ceb..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingHeading@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@2x.png deleted file mode 100644 index e2dae9e8ff..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@3x.png deleted file mode 100644 index 7a78214280..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocation@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@2x.png deleted file mode 100644 index 01f4da7cbc..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@3x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@3x.png deleted file mode 100644 index be8ac1a6ab..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/TrackingLocationOff@3x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/VineWatermark@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/VineWatermark@2x.png deleted file mode 100644 index 3457c7df07..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/VineWatermark@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/YoutubeWatermark@2x.png b/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/YoutubeWatermark@2x.png deleted file mode 100644 index 63ac731795..0000000000 Binary files a/submodules/LegacyComponents/Resources/LegacyComponentsResources.bundle/YoutubeWatermark@2x.png and /dev/null differ diff --git a/submodules/LegacyComponents/Sources/TGListsTableView.m b/submodules/LegacyComponents/Sources/TGListsTableView.m index 0f0f104da3..0a191029ab 100644 --- a/submodules/LegacyComponents/Sources/TGListsTableView.m +++ b/submodules/LegacyComponents/Sources/TGListsTableView.m @@ -4,8 +4,6 @@ #import "POPBasicAnimation.h" #import "Freedom.h" -#import "TGSearchBar.h" - #import @interface TGListsTableView () @@ -80,12 +78,6 @@ } } - UIView *tableHeaderView = self.tableHeaderView; - if (tableHeaderView != nil && [tableHeaderView respondsToSelector:@selector(updateClipping:)]) - { - [(TGSearchBar *)tableHeaderView updateClipping:bounds.origin.y + self.contentInset.top]; - } - UIView *indexView = self.subviews.lastObject; if ([NSStringFromClass([indexView class]) rangeOfString:@"ViewIndex"].location != NSNotFound) { diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsController.m b/submodules/LegacyComponents/Sources/TGMediaAssetsController.m index 2f0f9b13af..df17228fe4 100644 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsController.m +++ b/submodules/LegacyComponents/Sources/TGMediaAssetsController.m @@ -17,7 +17,6 @@ #import "TGModernBarButton.h" #import -#import "TGMediaAssetsTipView.h" #import #import @@ -586,23 +585,6 @@ } } -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - - if (_intent == TGMediaAssetsControllerSendFileIntent && self.shouldShowFileTipIfNeeded && iosMajorVersion() >= 7) - { - if (![[[NSUserDefaults standardUserDefaults] objectForKey:@"didShowDocumentPickerTip_v2"] boolValue]) - { - [[NSUserDefaults standardUserDefaults] setObject:@true forKey:@"didShowDocumentPickerTip_v2"]; - - TGMediaAssetsTipView *tipView = [[TGMediaAssetsTipView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.bounds.size.width, self.view.bounds.size.height)]; - tipView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - [self.navigationController.view addSubview:tipView]; - } - } -} - - (NSArray *)resultSignalsWithCurrentItem:(TGMediaAsset *)currentItem descriptionGenerator:(id (^)(id, NSString *, NSArray *, NSString *))descriptionGenerator { bool storeAssets = (_editingContext != nil) && self.shouldStoreAssets; diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.h b/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.h deleted file mode 100644 index ab5b611419..0000000000 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface TGMediaAssetsTipView : UIView - -@end diff --git a/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.m b/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.m deleted file mode 100644 index fa1ed784a7..0000000000 --- a/submodules/LegacyComponents/Sources/TGMediaAssetsTipView.m +++ /dev/null @@ -1,97 +0,0 @@ -#import "TGMediaAssetsTipView.h" - -#import "LegacyComponentsInternal.h" -#import "TGColor.h" -#import "TGImageUtils.h" -#import "TGFont.h" -#import "TGStringUtils.h" - -#import - -@interface TGMediaAssetsTipView () -{ - UIView *_wrapperView; - UIImageView *_imageView; - UILabel *_titleLabel; - UILabel *_textLabel; - TGModernButton *_doneButton; -} -@end - -@implementation TGMediaAssetsTipView - -- (instancetype)initWithFrame:(CGRect)frame -{ - self = [super initWithFrame:frame]; - if (self != nil) - { - self.backgroundColor = [UIColor whiteColor]; - - _wrapperView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; - [self addSubview:_wrapperView]; - - _imageView = [[UIImageView alloc] initWithImage:TGComponentsImageNamed(@"AttachmentTipIcons")]; - [self addSubview:_imageView]; - - _titleLabel = [[UILabel alloc] init]; - _titleLabel.backgroundColor = [UIColor clearColor]; - _titleLabel.textColor = UIColorRGB(0x222222); - _titleLabel.font = TGSystemFontOfSize(19.0f + TGRetinaPixel); - _titleLabel.text = TGLocalized(@"ShareFileTip.Title"); - [_wrapperView addSubview:_titleLabel]; - - _textLabel = [[UILabel alloc] init]; - _textLabel.backgroundColor = [UIColor clearColor]; - _textLabel.textColor = UIColorRGB(0x808080); - _textLabel.font = TGSystemFontOfSize(15.0f + TGRetinaPixel); - - NSString *shareTipText = [[NSString alloc] initWithFormat:TGLocalized(@"ShareFileTip.Text"), [TGStringUtils stringForDeviceType]]; - _textLabel.attributedText = [shareTipText attributedFormattedStringWithRegularFont:TGSystemFontOfSize(15.0f + TGRetinaPixel) boldFont:TGBoldSystemFontOfSize(15.0f + TGRetinaPixel) lineSpacing:3.0f paragraphSpacing:-1.0f alignment:NSTextAlignmentCenter]; - _textLabel.numberOfLines = 0; - _textLabel.lineBreakMode = NSLineBreakByWordWrapping; - [_wrapperView addSubview:_textLabel]; - - _doneButton = [[TGModernButton alloc] init]; - [_doneButton setTitle:TGLocalized(@"ShareFileTip.CloseTip") forState:UIControlStateNormal]; - _doneButton.titleLabel.font = TGSystemFontOfSize(18.0f); - [_doneButton setTitleColor:TGAccentColor()]; - _doneButton.contentEdgeInsets = UIEdgeInsetsMake(8.0f, 20.0f, 8.0f, 20.0f); - [_doneButton sizeToFit]; - [_doneButton addTarget:self action:@selector(doneButtonPressed) forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:_doneButton]; - } - return self; -} - -- (void)doneButtonPressed -{ - [UIView animateWithDuration:0.4 animations:^ - { - self.frame = CGRectMake(0.0f, self.superview.frame.size.height, self.frame.size.width, self.frame.size.height); - } completion:^(__unused BOOL finished) - { - [self removeFromSuperview]; - }]; -} - -- (void)layoutSubviews -{ - [super layoutSubviews]; - - _imageView.frame = CGRectMake((self.frame.size.width - _imageView.frame.size.width) / 2, 0, _imageView.frame.size.width, _imageView.frame.size.height); - - CGFloat padding = 22.0f; - - CGSize titleSize = [_titleLabel sizeThatFits:CGSizeMake(self.bounds.size.width - padding * 2.0f, CGFLOAT_MAX)]; - _titleLabel.frame = CGRectMake(padding, CGRectGetMaxY(_imageView.frame) + 22.0f + TGRetinaPixel, titleSize.width, titleSize.height); - - CGSize textSize = [_textLabel sizeThatFits:CGSizeMake(self.bounds.size.width - padding * 2.0f, CGFLOAT_MAX)]; - _textLabel.frame = CGRectMake(padding, CGRectGetMaxY(_titleLabel.frame) + 15.0f + TGRetinaPixel, textSize.width, textSize.height); - - CGFloat wrapperHeight = CGRectGetMaxY(_textLabel.frame); - _wrapperView.frame = CGRectMake(0, floor((self.frame.size.height - wrapperHeight) / 2.0f) - 30.0f, self.frame.size.width, wrapperHeight); - - _doneButton.frame = CGRectMake(CGFloor((self.bounds.size.width - _doneButton.frame.size.width) / 2.0f), self.frame.size.height - _doneButton.frame.size.height - 16.0f + TGRetinaPixel, _doneButton.frame.size.width, _doneButton.frame.size.height); -} - -@end diff --git a/submodules/LegacyComponents/Sources/TGPhotoBrushSettingsView.m b/submodules/LegacyComponents/Sources/TGPhotoBrushSettingsView.m index 6547a3c5ca..144cf5b68a 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoBrushSettingsView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoBrushSettingsView.m @@ -24,10 +24,6 @@ const CGFloat TGPhotoBrushSettingsItemHeight = 44.0f; NSArray *_brushViews; NSArray *_brushIconViews; NSArray *_brushSeparatorViews; - - UIImage *_landscapeLeftBackgroundImage; - UIImage *_landscapeRightBackgroundImage; - UIImage *_portraitBackgroundImage; } @end diff --git a/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.h b/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.h index bc962f881f..035895cab6 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.h +++ b/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.h @@ -35,10 +35,6 @@ typedef enum - (void)setIcon:(TGPhotoPaintSettingsViewIcon)icon animated:(bool)animated; - (void)setHighlighted:(bool)highlighted; -+ (UIImage *)landscapeLeftBackgroundImage; -+ (UIImage *)landscapeRightBackgroundImage; -+ (UIImage *)portraitBackgroundImage; - @end @protocol TGPhotoPaintPanelView diff --git a/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.m b/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.m index 6a9489a2ed..9a48e7c7c5 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.m +++ b/submodules/LegacyComponents/Sources/TGPhotoPaintSettingsView.m @@ -236,37 +236,4 @@ const CGFloat TGPhotoPaintSettingsPadPickerWidth = 360.0f; } } -+ (UIImage *)landscapeLeftBackgroundImage -{ - static dispatch_once_t onceToken; - static UIImage *image; - dispatch_once(&onceToken, ^ - { - image = [TGTintedImage(TGComponentsImageNamed(@"PaintPopupLandscapeLeftBackground"), UIColorRGB(0xf7f7f7)) resizableImageWithCapInsets:UIEdgeInsetsMake(32.0f, 32.0f, 32.0f, 32.0f)]; - }); - return image; -} - -+ (UIImage *)landscapeRightBackgroundImage -{ - static dispatch_once_t onceToken; - static UIImage *image; - dispatch_once(&onceToken, ^ - { - image = [TGTintedImage(TGComponentsImageNamed(@"PaintPopupLandscapeRightBackground"), UIColorRGB(0xf7f7f7)) resizableImageWithCapInsets:UIEdgeInsetsMake(32.0f, 32.0f, 32.0f, 32.0f)]; - }); - return image; -} - -+ (UIImage *)portraitBackgroundImage -{ - static dispatch_once_t onceToken; - static UIImage *image; - dispatch_once(&onceToken, ^ - { - image = [TGTintedImage(TGComponentsImageNamed(@"PaintPopupPortraitBackground"), UIColorRGB(0xf7f7f7)) resizableImageWithCapInsets:UIEdgeInsetsMake(32.0f, 32.0f, 32.0f, 32.0f)]; - }); - return image; -} - @end diff --git a/submodules/LegacyComponents/Sources/TGSearchBar.m b/submodules/LegacyComponents/Sources/TGSearchBar.m deleted file mode 100644 index 150b84d8b9..0000000000 --- a/submodules/LegacyComponents/Sources/TGSearchBar.m +++ /dev/null @@ -1,1197 +0,0 @@ -#import "TGSearchBar.h" - -#import "LegacyComponentsInternal.h" -#import "TGColor.h" - -#import -#import - -#import - -#import - -#import - -#import - -@interface TGSearchBar () -{ - CGFloat _cancelButtonWidth; - - TGSearchBarPallete *_pallete; -} - -@property (nonatomic, strong) UIView *wrappingClip; -@property (nonatomic, strong) UIView *wrappingView; - -@property (nonatomic, strong) UIImageView *textFieldBackground; - -@property (nonatomic, strong) UIImage *normalTextFieldBackgroundImage; -@property (nonatomic, strong) UIImage *activeTextFieldBackgroundImage; - -@property (nonatomic) bool showsCustomCancelButton; -@property (nonatomic, strong) UILabel *placeholderLabel; -@property (nonatomic, strong) UILabel *prefixLabel; -@property (nonatomic, strong) UIImageView *customSearchIcon; -@property (nonatomic, strong) UIActivityIndicatorView *customSearchActivityIndicator; -@property (nonatomic, strong) NSTimer *searchActivityTimer; -@property (nonatomic, strong) UIButton *customClearButton; - -@property (nonatomic, strong) UIView *customScopeButtonContainer; -@property (nonatomic, strong) UISegmentedControl *customSegmentedControl; -@property (nonatomic) int customCurrentScope; - -@end - -@implementation TGSearchBar - -+ (CGFloat)searchBarBaseHeight -{ - return 44.0f; -} - -- (CGFloat)baseHeight { - if (self.showsScopeBar) - return 44.0f; - if (_style == TGSearchBarStyleKeyboard) { - return [self inputHeight] + 17.0f; - } - return [self inputHeight] + 12.0f; -} - -- (CGFloat)inputContentOffset { - if (_style == TGSearchBarStyleKeyboard) { - return 3.0f; - } - return _style == TGSearchBarStyleLightAlwaysPlain ? 3.0f : 0.0f; -} - -- (CGFloat)searchIconOffset { - return _style == TGSearchBarStyleLightAlwaysPlain ? TGScreenPixel : 0.0f; -} - -- (CGFloat)inputHeight { - if (_style == TGSearchBarStyleKeyboard) { - return 33.0f; - } else { - return _style == TGSearchBarStyleLightAlwaysPlain ? 36.0f : 28.0f; - } -} - -+ (CGFloat)searchBarScopeHeight -{ - return 44.0f; -} - -- (CGFloat)topPadding -{ - if (_style == TGSearchBarStyleKeyboard) - return 4.0f; - - return -1.0f; -} - -- (CGFloat)cancelButtonPadding -{ - if (_style == TGSearchBarStyleKeyboard) - return -2.0f; - - return 0.0f; -} - -- (id)initWithFrame:(CGRect)frame -{ - return [self initWithFrame:frame style:TGSearchBarStyleLightPlain]; -} - -- (instancetype)initWithFrame:(CGRect)frame style:(TGSearchBarStyle)style -{ - self = [super initWithFrame:frame]; - if (self != nil) - { - _delayActivity = true; - - _wrappingClip = [[UIView alloc] initWithFrame:CGRectMake(0.0f, -20.0f, frame.size.width, frame.size.height + 20.0f)]; - _wrappingClip.clipsToBounds = true; - [self addSubview:_wrappingClip]; - - _wrappingView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 20.0f, frame.size.width, frame.size.height)]; - [_wrappingClip addSubview:_wrappingView]; - - _style = style; - - NSString *backgroundFileName = nil; - NSString *backgroundActiveFileName = nil; - - UIImage *backgroundManualImage = nil; - UIImage *backgroundManualActiveImage = nil; - - if (_style == TGSearchBarStyleDefault) - { - backgroundFileName = @"SearchBarBackground.png"; - backgroundActiveFileName = @"SearchBarBackground_Active.png"; - } - else if (_style == TGSearchBarStyleDark) - { - backgroundFileName = @"SearchBarBackgroundDark.png"; - backgroundActiveFileName = @"SearchBarBackgroundDark.png"; - } - else if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader) - { - static UIImage *image = nil; - static UIImage *imagePlain = nil; - static UIImage *imagePlainForced = nil; - static UIImage *imageHeader = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^ - { - UIGraphicsBeginImageContextWithOptions(CGSizeMake(1.0f, 3.0f), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - imagePlain = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - imagePlainForced = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - - CGContextSetFillColorWithColor(context, UIColorRGB(0xc8c7cc).CGColor); - CGFloat separatorHeight = TGScreenPixel; - CGContextFillRect(context, CGRectMake(0.0f, 3.0f - separatorHeight, 1.0f, separatorHeight)); - - image = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - UIGraphicsEndImageContext(); - - - UIGraphicsBeginImageContextWithOptions(CGSizeMake(1.0f, 3.0f), true, 0.0f); - context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, UIColorRGB(0xf7f7f7).CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - - CGContextSetFillColorWithColor(context, UIColorRGB(0xc8c7cc).CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 3.0f - separatorHeight, 1.0f, separatorHeight)); - - imageHeader = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - - UIGraphicsEndImageContext(); - }); - - if (_style == TGSearchBarStyleHeader) - { - backgroundManualImage = imageHeader; - backgroundManualActiveImage = imageHeader; - } - else - { - backgroundManualImage = _style == TGSearchBarStyleLight ? image : imagePlain; - backgroundManualActiveImage = _style == TGSearchBarStyleLightAlwaysPlain ? imagePlainForced : image; - } - } - - UIImage *backgroundImage = nil; - if (backgroundManualImage != nil) - backgroundImage = backgroundManualImage; - else - backgroundImage = [TGImageNamed(backgroundFileName) stretchableImageWithLeftCapWidth:1 topCapHeight:1]; - _customBackgroundView = [[UIImageView alloc] initWithFrame:self.bounds]; - _customBackgroundView.image = backgroundImage; - _customBackgroundView.userInteractionEnabled = true; - [_customBackgroundView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backgroundTapGesture:)]]; - [_wrappingView addSubview:_customBackgroundView]; - - UIImage *activeBackgroundImage = nil; - if (backgroundManualActiveImage != nil) - activeBackgroundImage = backgroundManualActiveImage; - else - activeBackgroundImage = [TGImageNamed(backgroundActiveFileName) stretchableImageWithLeftCapWidth:1 topCapHeight:1]; - _customActiveBackgroundView = [[UIImageView alloc] initWithFrame:self.bounds]; - _customActiveBackgroundView.image = activeBackgroundImage; - _customActiveBackgroundView.alpha = 0.0f; - [_wrappingView addSubview:_customActiveBackgroundView]; - - _textFieldBackground = [[UIImageView alloc] initWithImage:self.normalTextFieldBackgroundImage]; - _textFieldBackground.userInteractionEnabled = false; - [_wrappingView addSubview:_textFieldBackground]; - - UIColor *placeholderColor = nil; - if (_style == TGSearchBarStyleDefault) - placeholderColor = UIColorRGB(0x8e8e93); - else if (_style == TGSearchBarStyleDark) - placeholderColor = [UIColor whiteColor]; - else if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader) - placeholderColor = UIColorRGB(0x8e8e93); - - _placeholderLabel = [[UILabel alloc] init]; - _placeholderLabel.textAlignment = NSTextAlignmentLeft; - _placeholderLabel.userInteractionEnabled = false; - _placeholderLabel.textColor = placeholderColor; - _placeholderLabel.backgroundColor = [UIColor clearColor]; - _placeholderLabel.font = TGSystemFontOfSize(style == TGSearchBarStyleLightAlwaysPlain ? 16.0f : 14.0f); - _placeholderLabel.text = TGLocalized(@"Common.Search"); - [_wrappingView addSubview:_placeholderLabel]; - - _prefixLabel = [[UILabel alloc] init]; - _prefixLabel.textAlignment = NSTextAlignmentLeft; - _prefixLabel.userInteractionEnabled = false; - _prefixLabel.textColor = placeholderColor; - _prefixLabel.backgroundColor = [UIColor clearColor]; - _prefixLabel.font = TGSystemFontOfSize(style == TGSearchBarStyleLightAlwaysPlain ? 16.0f : 14.0f); - [_wrappingView addSubview:_prefixLabel]; - - UIImage *iconImage = nil; - if (_style == TGSearchBarStyleDefault) - { - iconImage = TGImageNamed(@"SearchBarIcon.png"); - } - else if (_style == TGSearchBarStyleDark) - { - iconImage = TGImageNamed(@"SearchBarIconDark.png"); - } - else if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleHeader) - { - iconImage = [TGSearchBar searchBarIcon:UIColorRGB(0x8e8e93)]; - } - else if (_style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleKeyboard) - { - iconImage = TGImageNamed(@"SearchBarIconLightLarge.png"); - } - - _customSearchIcon = [[UIImageView alloc] initWithImage:iconImage]; - _customSearchIcon.userInteractionEnabled = false; - [_wrappingView addSubview:_customSearchIcon]; - } - return self; -} - -- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event -{ - return [super hitTest:point withEvent:event]; -} - -+ (UIImage *)searchBarIcon:(UIColor *)color -{ - UIGraphicsBeginImageContextWithOptions(CGSizeMake(13, 13), false, 0.0f); - - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGContextSetStrokeColorWithColor(context, color.CGColor); - CGContextSetLineWidth(context, 1.0f); - CGContextSetLineCap(context, kCGLineCapRound); - CGContextStrokeEllipseInRect(context, CGRectMake(0.5f, 0.5f, 9.0f, 9.0f)); - - CGContextSetLineWidth(context, 1.5f); - CGContextMoveToPoint(context, 8.5f, 8.5f); - CGContextAddLineToPoint(context, 8.5f + 3.5f, 8.5f + 3.5f); - CGContextStrokePath(context); - - UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - - return image; -} - -- (void)setHighContrast:(bool)highContrast { - if (_highContrast != highContrast) { - _highContrast = highContrast; - _textFieldBackground.image = _showsCustomCancelButton ? self.activeTextFieldBackgroundImage : self.normalTextFieldBackgroundImage; - } -} - -- (void)setAlwaysExtended:(bool)alwaysExtended -{ - if (_alwaysExtended != alwaysExtended) - { - _alwaysExtended = alwaysExtended; - - [self layoutSubviews]; - } -} - -- (void)setFrame:(CGRect)frame -{ - [super setFrame:frame]; -} - -- (void)sizeToFit -{ - CGFloat requiredHeight = 0; - - if (_searchBarShouldShowScopeControl && ![self landscapeMode] && !_scopeBarCollapsed) - { - requiredHeight = [self baseHeight] + [TGSearchBar searchBarScopeHeight]; - } - else - { - requiredHeight = [self baseHeight]; - } - - if (_style == TGSearchBarStyleLight) - requiredHeight += 4.0f; - - CGRect frame = self.frame; - frame.size.height = requiredHeight; - self.frame = frame; -} - -- (BOOL)showsCancelButton -{ - return _showsCustomCancelButton; -} - -- (void)setPallete:(TGSearchBarPallete *)pallete -{ - _pallete = pallete; - - _customSearchActivityIndicator.color = _pallete.placeholderColor; - - _customTextField.textColor = pallete.textColor; - _prefixLabel.textColor = pallete.placeholderColor; - _placeholderLabel.textColor = pallete.placeholderColor; - - [UIView performWithoutAnimation:^ - { - bool shouldFlip = _customTextField.isFirstResponder; - if (shouldFlip) - [_customTextField resignFirstResponder]; - _customTextField.keyboardAppearance = _style == TGSearchBarStyleDark || _pallete.isDark ? UIKeyboardAppearanceAlert : UIKeyboardAppearanceDefault; - if (shouldFlip) - [_customTextField becomeFirstResponder]; - }]; - _customSearchIcon.image = [TGSearchBar searchBarIcon:pallete.placeholderColor]; - [_customClearButton setBackgroundImage:_pallete.clearIcon forState:UIControlStateNormal]; - - _normalTextFieldBackgroundImage = nil; - _activeTextFieldBackgroundImage = nil; - _textFieldBackground.image = _showsCustomCancelButton ? self.activeTextFieldBackgroundImage : self.normalTextFieldBackgroundImage; - - UIImage *backgroundManualImage = nil; - UIImage *backgroundManualActiveImage = nil; - - if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader || _style == TGSearchBarStyleKeyboard) - { - [(TGModernButton *)_customCancelButton setTitleColor:_pallete.accentColor]; - - UIGraphicsBeginImageContextWithOptions(CGSizeMake(1.0f, 3.0f), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - UIImage *imagePlain = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - CGContextSetFillColorWithColor(context, _style == TGSearchBarStyleLightAlwaysPlain ? pallete.menuBackgroundColor.CGColor : pallete.plainBackgroundColor.CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - UIImage *imagePlainForced = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - - CGContextSetFillColorWithColor(context, pallete.barSeparatorColor.CGColor); - CGFloat separatorHeight = TGScreenPixel; - CGContextFillRect(context, CGRectMake(0.0f, 3.0f - separatorHeight, 1.0f, separatorHeight)); - - UIImage *image = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - UIGraphicsEndImageContext(); - - - UIGraphicsBeginImageContextWithOptions(CGSizeMake(1.0f, 3.0f), true, 0.0f); - context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, pallete.barBackgroundColor.CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 0.0f, 1.0f, 3.0f)); - - CGContextSetFillColorWithColor(context, pallete.barSeparatorColor.CGColor); - CGContextFillRect(context, CGRectMake(0.0f, 3.0f - separatorHeight, 1.0f, separatorHeight)); - - UIImage *imageHeader = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:0 topCapHeight:1]; - - UIGraphicsEndImageContext(); - - if (_style == TGSearchBarStyleHeader) - { - backgroundManualImage = imageHeader; - backgroundManualActiveImage = imageHeader; - } - else - { - backgroundManualImage = _style == TGSearchBarStyleLight ? image : imagePlain; - backgroundManualActiveImage = _style == TGSearchBarStyleLightAlwaysPlain ? imagePlainForced : image; - } - - if (backgroundManualImage != nil) - _customBackgroundView.image = backgroundManualImage; - - if (backgroundManualActiveImage != nil) - _customActiveBackgroundView.image = backgroundManualActiveImage; - } -} - -- (UIImage *)normalTextFieldBackgroundImage -{ - if (_highContrast) { - UIColor *highContrastColor = _pallete != nil ? _pallete.highContrastBackgroundColor : UIColorRGB(0xe5e5e5); - CGFloat diameter = 14.0f; - UIGraphicsBeginImageContextWithOptions(CGSizeMake(diameter, diameter), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, highContrastColor.CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, diameter, diameter)); - UIImage *image = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:(NSInteger)(diameter / 2.0f) topCapHeight:(NSInteger)(diameter / 2.0f)]; - UIGraphicsEndImageContext(); - - return image; - } else if (_normalTextFieldBackgroundImage == nil) { - NSString *fileName = nil; - - if (_style == TGSearchBarStyleDefault) - fileName = @"SearchInputField.png"; - else if (_style == TGSearchBarStyleDark) - fileName = @"SearchInputFieldDark.png"; - else if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain) - { - UIColor *color = _pallete != nil ? _pallete.backgroundColor : UIColorRGB(0xf1f1f1); - UIGraphicsBeginImageContextWithOptions(CGSizeMake(14.0f, 14.0f), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, color.CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, 14.0f, 14.0f)); - UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); - image = [image stretchableImageWithLeftCapWidth:(int)(image.size.width / 2) topCapHeight:(int)(image.size.height / 2)]; - UIGraphicsEndImageContext(); - - _normalTextFieldBackgroundImage = image; - return _normalTextFieldBackgroundImage; - } - else if (_style == TGSearchBarStyleLightAlwaysPlain) - { - CGFloat diameter = 16.0f; - UIGraphicsBeginImageContextWithOptions(CGSizeMake(diameter, diameter), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, (_pallete != nil ? _pallete.highContrastBackgroundColor : UIColorRGB(0xe4e4e4)).CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, diameter, diameter)); - UIImage *image = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:(NSInteger)(diameter / 2.0f) topCapHeight:(NSInteger)(diameter / 2.0f)]; - UIGraphicsEndImageContext(); - - _normalTextFieldBackgroundImage = image; - return _normalTextFieldBackgroundImage; - } - else if (_style == TGSearchBarStyleKeyboard) - { - CGFloat diameter = 33.0; - UIGraphicsBeginImageContextWithOptions(CGSizeMake(diameter, diameter), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, (_pallete != nil ? _pallete.highContrastBackgroundColor : UIColorRGB(0xe4e4e4)).CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, diameter, diameter)); - UIImage *image = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:(NSInteger)(diameter / 2.0f) topCapHeight:(NSInteger)(diameter / 2.0f)]; - UIGraphicsEndImageContext(); - - _normalTextFieldBackgroundImage = image; - return _normalTextFieldBackgroundImage; - } - else if (_style == TGSearchBarStyleHeader) - { - CGFloat diameter = 10.0f; - UIGraphicsBeginImageContextWithOptions(CGSizeMake(diameter, diameter), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, (_pallete != nil ? _pallete.highContrastBackgroundColor : UIColorRGB(0xe4e4e4)).CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, diameter, diameter)); - UIImage *headerImage = [UIGraphicsGetImageFromCurrentImageContext() stretchableImageWithLeftCapWidth:(NSInteger)(diameter / 2.0f) topCapHeight:(NSInteger)(diameter / 2.0f)]; - UIGraphicsEndImageContext(); - - _normalTextFieldBackgroundImage = headerImage; - return _normalTextFieldBackgroundImage; - } - - UIImage *rawImage = TGImageNamed(fileName); - _normalTextFieldBackgroundImage = [rawImage stretchableImageWithLeftCapWidth:(int)(rawImage.size.width / 2) topCapHeight:(int)(rawImage.size.height / 2)]; - } - - return _normalTextFieldBackgroundImage; -} - -- (UIImage *)activeTextFieldBackgroundImage -{ - if (_activeTextFieldBackgroundImage == nil) - { - NSString *fileName = nil; - - if (_style == TGSearchBarStyleDefault) - fileName = @"SearchInputField_Active.png"; - else if (_style == TGSearchBarStyleDark) - fileName = @"SearchInputFieldDark.png"; - else if (_style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain) - { - UIColor *color = _pallete != nil ? _pallete.backgroundColor : UIColorRGB(0xf1f1f1); - UIGraphicsBeginImageContextWithOptions(CGSizeMake(14.0f, 14.0f), false, 0.0f); - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetFillColorWithColor(context, color.CGColor); - CGContextFillEllipseInRect(context, CGRectMake(0.0f, 0.0f, 14.0f, 14.0f)); - UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); - image = [image stretchableImageWithLeftCapWidth:(int)(image.size.width / 2) topCapHeight:(int)(image.size.height / 2)]; - UIGraphicsEndImageContext(); - - _activeTextFieldBackgroundImage = image; - return _activeTextFieldBackgroundImage; - } - else if (_style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader || _style == TGSearchBarStyleKeyboard) { - _activeTextFieldBackgroundImage = [self normalTextFieldBackgroundImage]; - return _activeTextFieldBackgroundImage; - } - - UIImage *rawImage = TGImageNamed(fileName); - _activeTextFieldBackgroundImage = [rawImage stretchableImageWithLeftCapWidth:(int)(rawImage.size.width / 2) topCapHeight:(int)(rawImage.size.height / 2)]; - } - - return _activeTextFieldBackgroundImage; -} - -- (UITextField *)maybeCustomTextField -{ - return _customTextField; -} - -- (UITextField *)customTextField -{ - if (_customTextField == nil) - { - CGRect frame = _textFieldBackground.frame; - frame.origin.y -= TGIsRetina() ? 0.0f : 0.0f; - frame.origin.x += 27; - frame.size.width -= 27 + 8 + 14; - _customTextField = [[TGTextField alloc] initWithFrame:frame]; - __weak TGSearchBar *weakSelf = self; - ((TGTextField *)_customTextField).deleteBackwardEmpty = ^{ - __strong TGSearchBar *strongSelf = weakSelf; - if (strongSelf != nil && strongSelf->_clearPrefix) { - strongSelf->_clearPrefix(false); - } - }; - _customTextField.font = _placeholderLabel.font; - if (iosMajorVersion() >= 7) - _customTextField.textAlignment = NSTextAlignmentNatural; - _customTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; - _customTextField.autocorrectionType = UITextAutocorrectionTypeNo; - - UIColor *textColor = nil; - UIImage *clearImage = nil; - - if (_style == TGSearchBarStyleDefault || _style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader || _style == TGSearchBarStyleKeyboard) - { - textColor = _pallete != nil ? _pallete.textColor : [UIColor blackColor]; - clearImage = TGImageNamed(@"SearchBarClearIcon.png"); - } - else if (_style == TGSearchBarStyleDark) - { - textColor = [UIColor whiteColor]; - clearImage = TGImageNamed(@"SearchBarClearIconDark.png"); - } - - _customTextField.textColor = textColor; - - _customTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - _customTextField.returnKeyType = UIReturnKeySearch; - _customTextField.keyboardAppearance = _style == TGSearchBarStyleDark || _pallete.isDark ? UIKeyboardAppearanceAlert : UIKeyboardAppearanceDefault; - _customTextField.delegate = self; - [_customTextField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged]; - - _customClearButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, clearImage.size.width, clearImage.size.height)]; - [_customClearButton setBackgroundImage:_pallete != nil ? _pallete.clearIcon : clearImage forState:UIControlStateNormal]; - [_customClearButton addTarget:self action:@selector(customClearButtonPressed) forControlEvents:UIControlEventTouchUpInside]; - _customClearButton.hidden = true; - - [_wrappingView addSubview:_customTextField]; - [_wrappingView addSubview:_customClearButton]; - - [self setNeedsLayout]; - } - - return _customTextField; -} - -- (UIButton *)customCancelButton -{ - if (_customCancelButton == nil) - { - _cancelButtonWidth = [TGLocalized(@"Common.Cancel") sizeWithFont:TGSystemFontOfSize(17.0f)].width + 11.0f; - - CGRect textFieldBackgroundFrame = _textFieldBackground.frame; - _customCancelButton = [[TGModernButton alloc] initWithFrame:CGRectMake(textFieldBackgroundFrame.origin.x + textFieldBackgroundFrame.size.width + 10, 0, _cancelButtonWidth, [self baseHeight])]; - [_customCancelButton setTitle:TGLocalized(@"Common.Cancel") forState:UIControlStateNormal]; - - UIColor *buttonColor = nil; - - if (_style == TGSearchBarStyleDefault || _style == TGSearchBarStyleLight || _style == TGSearchBarStyleLightPlain || _style == TGSearchBarStyleLightAlwaysPlain || _style == TGSearchBarStyleHeader || _style == TGSearchBarStyleKeyboard) - buttonColor = _pallete != nil ? _pallete.accentColor : TGAccentColor(); - else if (_style == TGSearchBarStyleDark) - buttonColor = [UIColor whiteColor]; - - [(TGModernButton *)_customCancelButton setTitleColor:buttonColor]; - _customCancelButton.titleLabel.font = TGSystemFontOfSize(17.0f); - _customCancelButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; - _customCancelButton.hidden = true; - [_customCancelButton addTarget:self action:@selector(searchCancelButtonPressed) forControlEvents:UIControlEventTouchUpInside]; - [_wrappingView addSubview:_customCancelButton]; - } - - return _customCancelButton; -} - -- (void)setShowsCancelButton:(BOOL)showsCancelButton -{ - [self setShowsCancelButton:showsCancelButton animated:false]; -} - -- (void)setShowsCancelButton:(bool)showsCancelButton animated:(bool)animated -{ - if (_showsCustomCancelButton != showsCancelButton) - { - if (showsCancelButton) - { - [self customCancelButton]; - _customCancelButton.hidden = _hidesCancelButton; - - if (_customScopeButtonTitles.count > 1) - { - self.customScopeButtonContainer.hidden = false; - [_customSegmentedControl setSelectedSegmentIndex:0]; - } - } - else - { - [_customTextField setText:@""]; - [self updatePlaceholder:@""]; - } - - _textFieldBackground.image = showsCancelButton ? self.activeTextFieldBackgroundImage : self.normalTextFieldBackgroundImage; - - _showsCustomCancelButton = showsCancelButton; - - if (animated) - { - if (showsCancelButton) - _wrappingClip.clipsToBounds = false; - - [UIView animateWithDuration:0.2 animations:^ - { - if (!showsCancelButton) - { - _customTextField.alpha = 0.0f; - _customClearButton.alpha = 0.0f; - } - - if (_customScopeButtonTitles.count > 1) - { - [self setSearchBarShouldShowScopeControl:showsCancelButton]; - _customScopeButtonContainer.alpha = showsCancelButton ? 1.0f : 0.0f; - } - - [self layoutSubviews]; - - _customActiveBackgroundView.alpha = showsCancelButton ? 1.0f : 0.0f; - } completion:^(__unused BOOL finished) - { - //if (finished) - { - if (showsCancelButton) - { - _customTextField.alpha = 1.0f; - _customClearButton.alpha = 1.0f; - } - else - { - _customCancelButton.hidden = true; - _customScopeButtonContainer.hidden = true; - - _wrappingClip.clipsToBounds = true; - } - } - }]; - } - else - { - _wrappingClip.clipsToBounds = !showsCancelButton; - - if (_customScopeButtonTitles.count > 1) - { - [self setSearchBarShouldShowScopeControl:showsCancelButton]; - _customScopeButtonContainer.alpha = showsCancelButton ? 1.0f : 0.0f; - } - - _customTextField.alpha = showsCancelButton ? 1.0f : 0.0f; - _customClearButton.alpha = _customTextField.alpha; - _customActiveBackgroundView.alpha = showsCancelButton ? 1.0f : 0.0f; - _customCancelButton.hidden = !showsCancelButton; - _customScopeButtonContainer.hidden = !showsCancelButton; - - [self layoutSubviews]; - } - } -} - -- (void)setSafeAreaInset:(UIEdgeInsets)safeAreaInset -{ - _safeAreaInset = safeAreaInset; - [self setNeedsLayout]; -} - -- (void)layoutSubviews -{ - [super layoutSubviews]; - - CGRect bounds = self.bounds; - - bool landscapeMode = [self landscapeMode]; - - CGRect clippingFrame = _wrappingClip.frame; - clippingFrame.size = CGSizeMake(bounds.size.width, bounds.size.height + 20.0f); - _wrappingClip.frame = clippingFrame; - - CGRect wrappingFrame = _wrappingView.frame; - wrappingFrame.size = bounds.size; - _wrappingView.frame = wrappingFrame; - - float retinaPixel = TGIsRetina() ? TGScreenPixel : 0.0f; - const float scopeBarHorizontalWidth = 220; - - CGFloat rightPadding = _showsCustomCancelButton && !_hidesCancelButton ? ((_customScopeButtonContainer != nil && landscapeMode ? scopeBarHorizontalWidth : 0) + _cancelButtonWidth) : 0.0f; - - CGFloat safeInsetHeight = self.safeAreaInset.top > FLT_EPSILON ? self.safeAreaInset.top : 20.0f; - _customBackgroundView.frame = CGRectMake(0, ((_showsCustomCancelButton || _alwaysExtended) ? -safeInsetHeight : 0.0f), self.frame.size.width, self.frame.size.height + (_showsCustomCancelButton || _alwaysExtended ? safeInsetHeight : 0.0f)); - _customActiveBackgroundView.frame = _customBackgroundView.frame; - - _textFieldBackground.frame = CGRectMake(8 + _safeAreaInset.left, 9 + [self topPadding], self.frame.size.width - 16 - rightPadding - _safeAreaInset.left - _safeAreaInset.right, [self inputHeight]); - - CGFloat prefixOffset = 0.0f; - { - [_prefixLabel sizeToFit]; - - CGRect frame = _textFieldBackground.frame; - frame.origin.y += 5.0f; - frame.origin.x += 27; - frame.size = _prefixLabel.bounds.size; - - frame.size.width = MIN(frame.size.width, CGFloor((bounds.size.width - rightPadding - 20.0f) / 2.0f)); - - _prefixLabel.frame = frame; - - prefixOffset = frame.size.width; - } - - CGSize placeholderSize = [_placeholderLabel.text sizeWithFont:_placeholderLabel.font]; - placeholderSize.width = MIN(placeholderSize.width, self.frame.size.width - rightPadding - 50.0f - prefixOffset); - - _customSearchIcon.frame = CGRectMake(_showsCustomCancelButton ? (_textFieldBackground.frame.origin.x + 8.0f) : ((CGFloor((self.frame.size.width - placeholderSize.width) / 2) + 10 + TGScreenPixel) - 20), [self searchIconOffset] + [self inputContentOffset] + 16 + retinaPixel + [self topPadding], _customSearchIcon.frame.size.width, _customSearchIcon.frame.size.height); - - _customSearchActivityIndicator.frame = (CGRect){{CGFloor(_customSearchIcon.frame.origin.x + (_customSearchIcon.frame.size.width - _customSearchActivityIndicator.frame.size.width) / 2.0f), CGFloor(_customSearchIcon.frame.origin.y + (_customSearchIcon.frame.size.height - _customSearchActivityIndicator.frame.size.height) / 2.0f) + 1.0f + TGScreenPixel}, _customSearchActivityIndicator.frame.size}; - - _placeholderLabel.frame = CGRectMake(_showsCustomCancelButton ? ((TGIsRTL() ? (CGRectGetMaxX(_textFieldBackground.frame) - placeholderSize.width - 32.0f) : 36 + _safeAreaInset.left) + prefixOffset) : (CGFloor((self.frame.size.width - placeholderSize.width) / 2) + 10 + TGScreenPixel), [self inputContentOffset] + 14 + [self topPadding], placeholderSize.width, placeholderSize.height); - - if (_customTextField != nil) - { - CGRect frame = _textFieldBackground.frame; - frame.origin.y -= retinaPixel; - frame.origin.x += 27; - frame.size.width -= 27 + 8 + 24; - - frame.origin.x += prefixOffset; - frame.size.width -= prefixOffset; - - _customTextField.frame = frame; - - _customClearButton.frame = CGRectMake(CGRectGetMaxX(_textFieldBackground.frame) - 22, [self inputContentOffset] + 16 + [self topPadding] + (_style == TGSearchBarStyleLightAlwaysPlain ? 1.0f : 0.0f), _customClearButton.frame.size.width, _customClearButton.frame.size.height); - } - - if (_customCancelButton != nil) - { - _customCancelButton.frame = CGRectMake(self.frame.size.width + (_showsCustomCancelButton ? (-_customCancelButton.frame.size.width - 9 - self.safeAreaInset.right) : 9), [self topPadding] + 2.0f + [self cancelButtonPadding], _cancelButtonWidth, [self baseHeight]); - } - - if (_customScopeButtonContainer != nil) - { - if (_showsCustomCancelButton) - { - if (!landscapeMode) - _customScopeButtonContainer.frame = CGRectMake(7.0f, self.frame.size.height - 29.0f - 9.0f + [self topPadding], self.frame.size.width - 14.0f, 29.0f); - else - _customScopeButtonContainer.frame = CGRectMake(self.frame.size.width - scopeBarHorizontalWidth - _customCancelButton.frame.size.width - self.safeAreaInset.right, 5.0f + [self topPadding], scopeBarHorizontalWidth - 14.0f, 32.0f); - } - else - { - if (!landscapeMode) - _customScopeButtonContainer.frame = CGRectMake(7.0f, self.frame.size.height - 29.0f - 9.0f + [self topPadding], self.frame.size.width - 14.0f, 29.0f); - else - _customScopeButtonContainer.frame = CGRectMake(self.frame.size.width + 71.0f, 5.0f + [self topPadding], scopeBarHorizontalWidth - 14.0f, 29.0f); - } - } -} - -- (bool)landscapeMode -{ - static CGFloat landscapeScreenWidth = 0.0f; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^ - { - CGSize screenSize = TGScreenSize(); - landscapeScreenWidth = MAX(screenSize.width, screenSize.height); - }); - - return self.frame.size.width >= landscapeScreenWidth - FLT_EPSILON; -} - -- (void)setSearchBarShouldShowScopeControl:(bool)searchBarShouldShowScopeControl -{ - _searchBarShouldShowScopeControl = searchBarShouldShowScopeControl; - - if (_searchBarShouldShowScopeControl) - self.customScopeButtonContainer.hidden = false; - - CGFloat requiredHeight = 0; - - if (_searchBarShouldShowScopeControl && ![self landscapeMode]) - requiredHeight = [self baseHeight] + [TGSearchBar searchBarScopeHeight]; - else - requiredHeight = [self baseHeight]; - - if (ABS(requiredHeight - self.frame.size.height) > FLT_EPSILON) - { - id delegate = (id)self.delegate; - if ([delegate respondsToSelector:@selector(searchBar:willChangeHeight:)]) - [delegate searchBar:self willChangeHeight:requiredHeight]; - } -} - -- (void)setCustomScopeBarHidden:(bool)hidden -{ - self.customScopeButtonContainer.alpha = hidden ? 0.0f : 1.0f; - self.customScopeButtonContainer.userInteractionEnabled = !hidden; -} - -#pragma mark - - -- (void)tappedSearchBar:(id)__unused arg -{ -} - -- (BOOL)becomeFirstResponder -{ - if (![_customTextField isFirstResponder]) - { - bool shouldBeginEditing = true; - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBarShouldBeginEditing:)]) - shouldBeginEditing = [delegate searchBarShouldBeginEditing:(UISearchBar *)self]; - - if (shouldBeginEditing) - { - [self.customTextField becomeFirstResponder]; - - if ([delegate respondsToSelector:@selector(searchBarTextDidBeginEditing:)]) - [delegate searchBarTextDidBeginEditing:(UISearchBar *)self]; - - return true; - } - } - - return false; -} - -- (BOOL)resignFirstResponder -{ - return [_customTextField resignFirstResponder]; -} - -- (BOOL)canBecomeFirstResponder -{ - return _customTextField == nil || [_customTextField canBecomeFirstResponder]; -} - -- (BOOL)canResignFirstResponder -{ - return [_customTextField canResignFirstResponder]; -} - -- (BOOL)isFirstResponder { - return [_customTextField isFirstResponder]; -} - -#pragma mark - - -- (void)searchCancelButtonPressed -{ - id delegate = self.delegate; - - if ([delegate respondsToSelector:@selector(searchBarCancelButtonClicked:)]) - [delegate searchBarCancelButtonClicked:(UISearchBar *)self]; -} - -- (UIView *)customScopeButtonContainer -{ - if (_customScopeButtonContainer == nil) - { - CGRect frame = CGRectZero; - if (![self landscapeMode]) - frame = CGRectMake(7.0f, self.frame.size.height - 29.0f - 9.0f, self.frame.size.width - 14.0f, 29.0f); - else - frame = CGRectMake(0, 0, self.frame.size.width, 29.0f); - - _customScopeButtonContainer = [[UIView alloc] initWithFrame:frame]; - _customScopeButtonContainer.alpha = 0.0f; - [_wrappingView insertSubview:_customScopeButtonContainer aboveSubview:_customActiveBackgroundView]; - - _customSegmentedControl = [[UISegmentedControl alloc] initWithItems:self.customScopeButtonTitles]; - - [_customSegmentedControl setBackgroundImage:_pallete != nil ? _pallete.segmentedControlBackgroundImage : TGComponentsImageNamed(@"ModernSegmentedControlBackground.png") forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; - [_customSegmentedControl setBackgroundImage:_pallete != nil ? _pallete.segmentedControlSelectedImage : TGComponentsImageNamed(@"ModernSegmentedControlSelected.png") forState:UIControlStateSelected barMetrics:UIBarMetricsDefault]; - [_customSegmentedControl setBackgroundImage:_pallete != nil ? _pallete.segmentedControlSelectedImage : TGComponentsImageNamed(@"ModernSegmentedControlSelected.png") forState:UIControlStateSelected | UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; - [_customSegmentedControl setBackgroundImage:_pallete != nil ? _pallete.segmentedControlHighlightedImage : TGComponentsImageNamed(@"ModernSegmentedControlHighlighted.png") forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; - [_customSegmentedControl setDividerImage:_pallete != nil ? _pallete.segmentedControlDividerImage : TGComponentsImageNamed(@"ModernSegmentedControlDivider.png") forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; - - [_customSegmentedControl setTitleTextAttributes:@{UITextAttributeTextColor:_pallete != nil ? _pallete.accentColor : TGAccentColor(), UITextAttributeTextShadowColor: [UIColor clearColor], UITextAttributeFont: TGSystemFontOfSize(13)} forState:UIControlStateNormal]; - [_customSegmentedControl setTitleTextAttributes:@{UITextAttributeTextColor:_pallete != nil ? _pallete.accentContrastColor : [UIColor whiteColor], UITextAttributeTextShadowColor: [UIColor clearColor], UITextAttributeFont: TGSystemFontOfSize(13)} forState:UIControlStateSelected]; - - _customSegmentedControl.frame = CGRectMake(0, _customScopeButtonContainer.frame.size.height - 29.0f, _customScopeButtonContainer.frame.size.width, 29.0f); - _customSegmentedControl.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; - - [_customSegmentedControl setSelectedSegmentIndex:0]; - [_customSegmentedControl addTarget:self action:@selector(segmentedControlChanged) forControlEvents:UIControlEventValueChanged]; - - [_customScopeButtonContainer addSubview:_customSegmentedControl]; - } - - return _customScopeButtonContainer; -} - -- (void)backgroundTapGesture:(UITapGestureRecognizer *)recognizer -{ - if (recognizer.state == UIGestureRecognizerStateRecognized) - { - if (![_customTextField isFirstResponder]) - { - bool shouldBeginEditing = true; - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBarShouldBeginEditing:)]) - shouldBeginEditing = [delegate searchBarShouldBeginEditing:(UISearchBar *)self]; - - if (shouldBeginEditing) - { - [self.customTextField becomeFirstResponder]; - - if ([delegate respondsToSelector:@selector(searchBarTextDidBeginEditing:)]) - [delegate searchBarTextDidBeginEditing:(UISearchBar *)self]; - } - } - } -} - -- (void)updatePlaceholder:(NSString *)text -{ - _placeholderLabel.hidden = text.length != 0; - _customClearButton.hidden = !_placeholderLabel.hidden && _prefixText.length == 0; -} - -- (void)textFieldDidChange:(UITextField *)textField -{ - if (textField == _customTextField) - { - NSString *text = textField.text; - - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBar:textDidChange:)]) - [delegate searchBar:(UISearchBar *)self textDidChange:text]; - - [self updatePlaceholder:text]; - } -} - -- (BOOL)textFieldShouldReturn:(UITextField *)textField -{ - if (textField == _customTextField) - { - if (textField.text.length != 0) - { - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBarSearchButtonClicked:)]) - [delegate searchBarSearchButtonClicked:(UISearchBar *)self]; - } - - [textField resignFirstResponder]; - - return false; - } - - return false; -} - -- (void)customClearButtonPressed -{ - if (_customTextField.text.length == 0) { - if (_prefixText.length != 0) { - if (_clearPrefix) { - _clearPrefix(true); - } - } - } else { - [_customTextField setText:@""]; - [self updatePlaceholder:@""]; - - [self becomeFirstResponder]; - - NSString *text = @""; - - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBar:textDidChange:)]) - [delegate searchBar:(UISearchBar *)self textDidChange:text]; - } -} - -- (NSInteger)selectedScopeButtonIndex -{ - return _customSegmentedControl.selectedSegmentIndex; -} - -- (void)setSelectedScopeButtonIndex:(NSInteger)selectedScopeButtonIndex -{ - [self.customSegmentedControl setSelectedSegmentIndex:selectedScopeButtonIndex]; -} - -- (void)setPlaceholder:(NSString *)placeholder -{ - _placeholder = placeholder; - _placeholderLabel.text = placeholder; - - [self setNeedsLayout]; -} - -- (NSString *)text -{ - return _customTextField.text; -} - -- (void)setText:(NSString *)text -{ - bool layout = _customTextField == nil; - self.customTextField.text = text; - if (layout) - [self setNeedsLayout]; - - [self textFieldDidChange:_customTextField]; -} - -- (void)segmentedControlChanged -{ - if (_showsCustomCancelButton) - { - id delegate = self.delegate; - if ([delegate respondsToSelector:@selector(searchBar:selectedScopeButtonIndexDidChange:)]) - [delegate searchBar:(UISearchBar *)self selectedScopeButtonIndexDidChange:_customSegmentedControl.selectedSegmentIndex]; - } -} - -- (void)updateClipping:(CGFloat)clippedHeight -{ - CGFloat offset = self.frame.size.height + MAX(0.0f, MIN(clippedHeight, self.frame.size.height)); - - CGRect frame = _wrappingClip.frame; - frame.origin.y = offset - frame.size.height + 20.0f; - _wrappingClip.frame = frame; - - CGRect wrapFrame = _wrappingView.frame; - wrapFrame.origin.y = -offset + wrapFrame.size.height; - _wrappingView.frame = wrapFrame; -} - -- (void)localizationUpdated -{ - _placeholderLabel.text = TGLocalized(@"Common.Search"); - - _cancelButtonWidth = [TGLocalized(@"Common.Cancel") sizeWithFont:TGSystemFontOfSize(17.0f)].width + 11.0f; - - CGRect textFieldBackgroundFrame = _textFieldBackground.frame; - _customCancelButton.frame = CGRectMake(textFieldBackgroundFrame.origin.x + textFieldBackgroundFrame.size.width + 10, _customCancelButton.frame.origin.y, _cancelButtonWidth, [self baseHeight]); - [_customCancelButton setTitle:TGLocalized(@"Common.Cancel") forState:UIControlStateNormal]; - - [_customSegmentedControl removeAllSegments]; - int index = -1; - for (NSString *itemText in _customScopeButtonTitles) - { - index++; - [_customSegmentedControl insertSegmentWithTitle:itemText atIndex:(NSUInteger)index animated:false]; - } - - [self setNeedsLayout]; -} - -- (void)setShowActivity:(bool)showActivity -{ - if (_showActivity != showActivity) - { - [_searchActivityTimer invalidate]; - _searchActivityTimer = nil; - - _showActivity = showActivity; - - if (_delayActivity && showActivity) - { - _searchActivityTimer = [TGTimerTarget scheduledMainThreadTimerWithTarget:self action:@selector(searchActivityTimerEvent) interval:0.2 repeat:false]; - } - else - [self searchActivityTimerEvent]; - } -} - -- (void)searchActivityTimerEvent -{ - _customSearchIcon.hidden = _showActivity; - UIActivityIndicatorView *indicator = _customSearchActivityIndicator; - if (_showActivity) - { - if (indicator == nil) - { - indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:4]; - if (_pallete != nil) - indicator.color = _pallete.placeholderColor; - indicator.userInteractionEnabled = false; - indicator.hidden = true; - [_wrappingView addSubview:indicator]; - - _customSearchActivityIndicator = indicator; - } - - indicator.hidden = false; - indicator.frame = (CGRect){{CGFloor(_customSearchIcon.frame.origin.x + (_customSearchIcon.frame.size.width - indicator.frame.size.width) / 2.0f), CGFloor(_customSearchIcon.frame.origin.y + (_customSearchIcon.frame.size.height - indicator.frame.size.height) / 2.0f) + 1.0f}, indicator.frame.size}; - [indicator startAnimating]; - } - else - { - indicator.hidden = true; - [indicator stopAnimating]; - } -} - -- (void)setPrefixText:(NSAttributedString *)prefixText { - _prefixText = prefixText; - _prefixLabel.attributedText = prefixText; - _customClearButton.hidden = !_placeholderLabel.hidden && _prefixText.length == 0; - - [self setNeedsLayout]; -} - -@end - - -@implementation TGSearchBarPallete - -+ (instancetype)palleteWithDark:(bool)dark backgroundColor:(UIColor *)backgroundColor highContrastBackgroundColor:(UIColor *)highContrastBackgroundColor textColor:(UIColor *)textColor placeholderColor:(UIColor *)placeholderColor clearIcon:(UIImage *)clearIcon barBackgroundColor:(UIColor *)barBackgroundColor barSeparatorColor:(UIColor *)barSeparatorColor plainBackgroundColor:(UIColor *)plainBackgroundColor accentColor:(UIColor *)accentColor accentContrastColor:(UIColor *)accentContrastColor menuBackgroundColor:(UIColor *)menuBackgroundColor segmentedControlBackgroundImage:(UIImage *)segmentedControlBackgroundImage segmentedControlSelectedImage:(UIImage *)segmentedControlSelectedImage segmentedControlHighlightedImage:(UIImage *)segmentedControlHighlightedImage segmentedControlDividerImage:(UIImage *)segmentedControlDividerImage -{ - TGSearchBarPallete *pallete = [[TGSearchBarPallete alloc] init]; - pallete->_isDark = dark; - pallete->_backgroundColor = backgroundColor; - pallete->_highContrastBackgroundColor = highContrastBackgroundColor; - pallete->_textColor = textColor; - pallete->_placeholderColor = placeholderColor; - pallete->_clearIcon = clearIcon; - pallete->_barBackgroundColor = barBackgroundColor; - pallete->_barSeparatorColor = barSeparatorColor; - pallete->_plainBackgroundColor = plainBackgroundColor; - pallete->_accentColor = accentColor; - pallete->_accentContrastColor = accentContrastColor; - pallete->_menuBackgroundColor = menuBackgroundColor; - pallete->_segmentedControlBackgroundImage = segmentedControlBackgroundImage; - pallete->_segmentedControlSelectedImage = segmentedControlSelectedImage; - pallete->_segmentedControlHighlightedImage = segmentedControlHighlightedImage; - pallete->_segmentedControlDividerImage = segmentedControlDividerImage; - return pallete; -} - -@end diff --git a/submodules/LegacyComponents/Sources/TGSearchDisplayMixin.m b/submodules/LegacyComponents/Sources/TGSearchDisplayMixin.m deleted file mode 100644 index 25da3a30ac..0000000000 --- a/submodules/LegacyComponents/Sources/TGSearchDisplayMixin.m +++ /dev/null @@ -1,457 +0,0 @@ -#import "TGSearchDisplayMixin.h" - -#import "LegacyComponentsInternal.h" -#import "TGColor.h" -#import "TGHacks.h" - -#import "TGSearchBar.h" - -#import - -@interface TGSearchDisplayMixin () - -@property (nonatomic) UIEdgeInsets controllerInset; - -@property (nonatomic, strong) UIView *dimView; - -@property (nonatomic, strong) UIView *tableViewContainer; - -@end - -@implementation TGSearchDisplayMixin - -- (instancetype)init -{ - self = [super init]; - if (self != nil) - { - - } - return self; -} - -- (void)dealloc -{ - [self unload]; -} - -- (void)unload -{ - [self _unloadTableView]; -} - -- (void)_unloadTableView -{ - [_searchResultsTableView removeFromSuperview]; - - _searchResultsTableView.delegate = nil; - _searchResultsTableView.dataSource = nil; - _searchResultsTableView = nil; -} - -- (void)setSearchBar:(UISearchBar *)searchBar -{ - if (_searchBar != nil) - _searchBar.delegate = nil; - - _searchBar = (TGSearchBar *)searchBar; - _searchBar.delegate = self; -} - -- (void)setIsActive:(bool)isActive -{ - [self setIsActive:isActive animated:true]; -} - -- (void)setIsActive:(bool)isActive animated:(bool)animated -{ - if (_isActive != isActive) - { - _isActive = isActive; - - if (isActive || !self.alwaysShowsCancelButton) - [_searchBar setShowsCancelButton:isActive animated:animated]; - - if (isActive) - { - id delegate = _delegate; - - UIView *referenceView = [delegate referenceViewForSearchResults]; - - [self setSearchResultsTableViewHidden:true]; - _searchResultsTableView.alpha = 1.0f; - - if (_dimView == nil) - { - _dimView = [[UIView alloc] init]; - _dimView.backgroundColor = UIColorRGBA(0x000000, 0.4f); - _dimView.alpha = 0.0f; - _dimView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - } - - if (_tableViewContainer == nil) - { - _tableViewContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)]; - _tableViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - - UIView *tapView = [[UIView alloc] initWithFrame:_tableViewContainer.bounds]; - tapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - [tapView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dimViewTapped:)]]; - [_tableViewContainer addSubview:tapView]; - } - - CGRect dimViewFrame = referenceView.bounds; - - if ([referenceView isKindOfClass:[UIScrollView class]]) - { - UIScrollView *referenceScrollView = (UIScrollView *)referenceView; - dimViewFrame.origin.y = -referenceScrollView.contentOffset.y + _searchBar.frame.size.height; - } - else - { - if (_simpleLayout) { - dimViewFrame.origin.y = _controllerInset.top; - } else { - CGRect searchBarReferenceFrame = [_searchBar convertRect:_searchBar.bounds toView:referenceView.superview]; - dimViewFrame.origin.y = searchBarReferenceFrame.origin.y + searchBarReferenceFrame.size.height; - } - } - - [[referenceView superview] insertSubview:_tableViewContainer aboveSubview:referenceView]; - - [[referenceView superview] insertSubview:_dimView aboveSubview:referenceView]; - - _dimView.frame = dimViewFrame; - - _dimView.layer.frame = dimViewFrame; - - CGRect tableViewContainerFrame = referenceView.frame; - if (_simpleLayout) { - tableViewContainerFrame.origin.y = _controllerInset.top; - } else { - tableViewContainerFrame.origin.y = _controllerInset.top + _searchBar.frame.size.height; - } - _tableViewContainer.frame = tableViewContainerFrame; - - _tableViewContainer.layer.frame = _tableViewContainer.frame; - - if (animated) - { - [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^ - { - _dimView.alpha = 1.0f; - } completion:nil]; - } - else - { - _dimView.alpha = 1.0f; - } - - [self _updateSearchBarLayout:animated]; - - if ([delegate respondsToSelector:@selector(searchMixinWillActivate:)]) - [delegate searchMixinWillActivate:animated]; - } - else - { - [self _updateSearchBarLayout:animated]; - - [_searchBar resignFirstResponder]; - [_searchBar setText:@""]; - - if (animated) - { - id delegate = _delegate; - if ([delegate respondsToSelector:@selector(searchMixinWillDeactivate:)]) - [delegate searchMixinWillDeactivate:animated]; - - [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^ - { - _dimView.alpha = 0.0f; - _searchResultsTableView.alpha = 0.0f; - } completion:^(BOOL finished) - { - if (finished) - { - [_dimView removeFromSuperview]; - [_tableViewContainer removeFromSuperview]; - [_searchResultsTableView removeFromSuperview]; - - [self _unloadTableView]; - } - }]; - } - else - { - id delegate = _delegate; - if ([delegate respondsToSelector:@selector(searchMixinWillDeactivate:)]) - [delegate searchMixinWillDeactivate:animated]; - - _dimView.alpha = 0.0f; - - [_dimView removeFromSuperview]; - [_tableViewContainer removeFromSuperview]; - [_searchResultsTableView removeFromSuperview]; - - [self _unloadTableView]; - } - } - } -} - -- (void)_updateSearchBarLayout:(bool)animated -{ - CGFloat currentHeight = _searchBar.frame.size.height; - - if (((TGSearchBar *)_searchBar).customScopeButtonTitles.count > 1) - { - bool updateSize = false; - - updateSize = true; - - if (updateSize) - [_searchBar sizeToFit]; - } - - if (ABS(currentHeight - _searchBar.frame.size.height) > FLT_EPSILON) - { - if (animated) - { - [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^ - { - [self searchBar:(TGSearchBar *)_searchBar willChangeHeight:_searchBar.frame.size.height]; - [_searchBar layoutSubviews]; - } completion:^(BOOL finished) - { - if (finished) - { - } - }]; - } - else - { - [self searchBar:(TGSearchBar *)_searchBar willChangeHeight:_searchBar.frame.size.height]; - [_searchBar layoutSubviews]; - } - } -} - -- (void)controllerInsetUpdated:(UIEdgeInsets)controllerInset -{ - _controllerInset = controllerInset; - - [self controllerLayoutUpdated:CGSizeZero]; -} - -- (void)controllerLayoutUpdated:(CGSize)__unused layoutSize -{ - [self _updateSearchBarLayout:false]; - - if (_dimView != nil && _dimView.superview != nil) - { - CGRect frame = _dimView.superview.bounds; - if (_simpleLayout) { - frame.origin.y = _controllerInset.top; - } else { - frame.origin.y = _controllerInset.top + _searchBar.frame.size.height; - } - _dimView.frame = frame; - } - - if (_tableViewContainer != nil && _tableViewContainer.superview != nil) - { - CGRect tableViewContainerFrame = _tableViewContainer.frame; - if (_simpleLayout) { - tableViewContainerFrame.origin.y = _controllerInset.top; - } else { - tableViewContainerFrame.origin.y = _controllerInset.top + _searchBar.frame.size.height; - } - _tableViewContainer.frame = tableViewContainerFrame; - } - - if (_searchResultsTableView != nil && _searchResultsTableView.superview != nil) - { - UIEdgeInsets tableInset = _controllerInset; - tableInset.bottom += tableInset.top + _searchBar.frame.size.height; - tableInset.top = 0; - _searchResultsTableView.contentInset = tableInset; - _searchResultsTableView.scrollIndicatorInsets = tableInset; - } - - if (_searchBar.showsScopeBar) - { - CATransition *transition = [CATransition animation]; - transition.duration = 0.2 * TGAnimationSpeedFactor(); - transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; - [_searchBar.layer addAnimation:transition forKey:@"content"]; - } -} - -- (void)searchBar:(TGSearchBar *)searchBar willChangeHeight:(CGFloat)newHeight -{ - if (searchBar == _searchBar) - { - id delegate = _delegate; - UIView *referenceView = [delegate referenceViewForSearchResults]; - - if ([referenceView isKindOfClass:[UITableView class]]) - { - static NSInvocation *invocation = nil; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^ - { - SEL selector = NSSelectorFromString(TGEncodeText(@"`ubcmfIfbefsIfjhiuEjeDibohfUpIfjhiu;", -1)); - - NSMethodSignature *signature = [[UITableView class] instanceMethodSignatureForSelector:selector]; - if (signature == nil) - { - TGLegacyLog(@"***** Method not found"); - } - else - { - invocation = [NSInvocation invocationWithMethodSignature:signature]; - [invocation setSelector:selector]; - } - }); - - if (invocation != nil) - { - [invocation setTarget:referenceView]; - CGFloat height = newHeight; - [invocation setArgument:&height atIndex:2]; - [invocation invoke]; - - [invocation setTarget:nil]; - } - } - } -} - -- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar -{ - if (searchBar == (UISearchBar *)_searchBar) - { - [self setIsActive:true animated:true]; - } -} - -- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText -{ - if (searchBar == (UISearchBar *)_searchBar) - { - id delegate = _delegate; - if ([delegate respondsToSelector:@selector(searchMixin:hasChangedSearchQuery:withScope:)]) - { - [delegate searchMixin:self hasChangedSearchQuery:searchText withScope:(int)_searchBar.selectedScopeButtonIndex]; - } - - //if (searchText.length == 0) - // [self setSearchResultsTableViewHidden:false]; - } -} - -- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar -{ - if (searchBar == (UISearchBar *)_searchBar) - { - [self setIsActive:false animated:true]; - } -} - -- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar -{ - if (searchBar == (UISearchBar *)_searchBar) - { - [_searchBar resignFirstResponder]; - } -} - -- (void)searchBar:(UISearchBar *)searchBar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope -{ - if (searchBar == (UISearchBar *)_searchBar) - { - id delegate = _delegate; - if ([delegate respondsToSelector:@selector(searchMixin:hasChangedSearchQuery:withScope:)]) - [delegate searchMixin:self hasChangedSearchQuery:_searchBar.text withScope:(int)selectedScope]; - } -} - -- (void)dimViewTapped:(UITapGestureRecognizer *)recognizer -{ - if (recognizer.state == UIGestureRecognizerStateRecognized) - { - if (_searchResultsTableView == nil || _searchResultsTableView.hidden) - [self setIsActive:false animated:true]; - } -} - -#pragma mark - - -- (bool)searchResultsTableViewHidden -{ - return _searchResultsTableView == nil || _searchResultsTableView.hidden; -} - -- (void)setSearchResultsTableViewHidden:(bool)searchResultsTableViewHidden -{ - [self setSearchResultsTableViewHidden:searchResultsTableViewHidden animated:false]; -} - -- (void)setSearchResultsTableViewHidden:(bool)searchResultsTableViewHidden animated:(bool)animated -{ - bool wasHidden = _searchResultsTableView.hidden; - - _searchResultsTableView.hidden = searchResultsTableViewHidden; - _dimView.hidden = !searchResultsTableViewHidden; - - if (animated && wasHidden && !searchResultsTableViewHidden) - { - _searchResultsTableView.alpha = 0.0f; - [UIView animateWithDuration:0.25 animations:^ - { - _searchResultsTableView.alpha = 1.0f; - }]; - } -} - -- (void)reloadSearchResults -{ - if (_searchResultsTableView == nil) - { - id delegate = _delegate; - - _searchResultsTableView = [delegate createTableViewForSearchMixin:self]; - _searchResultsTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpartial-availability" - if (iosMajorVersion() >= 11) - _searchResultsTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; -#pragma clang diagnostic pop - - [self setSearchResultsTableViewHidden:true]; - } - - if (_searchResultsTableView.superview == nil) - { - _searchResultsTableView.frame = _tableViewContainer.bounds; - - UIEdgeInsets tableInset = _controllerInset; - tableInset.bottom += tableInset.top + _searchBar.frame.size.height; - tableInset.top = 0; - _searchResultsTableView.contentInset = tableInset; - _searchResultsTableView.scrollIndicatorInsets = tableInset; - - [_tableViewContainer addSubview:_searchResultsTableView]; - } - - [_searchResultsTableView reloadData]; -} - -- (void)resignResponderIfAny -{ - [_searchBar resignFirstResponder]; -} - -@end diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Contents.json b/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Contents.json index 38f0c81fc2..6e965652df 100644 --- a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Contents.json +++ b/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Contents.json @@ -1,9 +1,9 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 }, "properties" : { "provides-namespace" : true } -} \ No newline at end of file +} diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Contents.json deleted file mode 100644 index 5842000dfb..0000000000 --- a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "Siri@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "Siri@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@2x.png b/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@2x.png deleted file mode 100644 index 457b2d53c7..0000000000 Binary files a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@2x.png and /dev/null differ diff --git a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@3x.png b/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@3x.png deleted file mode 100644 index 3fc45952bc..0000000000 Binary files a/submodules/TelegramUI/Images.xcassets/Settings/Permissions/Siri.imageset/Siri@3x.png and /dev/null differ