From b6ae46ff288026fec33ac6c258f3e389a12a2db8 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 21 Jul 2023 21:03:49 +0200 Subject: [PATCH] Fix build --- .../Sources/TextFieldComponent.swift | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift b/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift index 0adb2fef2f..93810487c9 100644 --- a/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift +++ b/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift @@ -76,12 +76,6 @@ public final class TextFieldComponent: Component { } } - public enum FormatMenuAvailability: Equatable { - case available - case locked - case none - } - public let context: AccountContext public let strings: PresentationStrings public let externalState: ExternalState @@ -89,8 +83,6 @@ public final class TextFieldComponent: Component { public let textColor: UIColor public let insets: UIEdgeInsets public let hideKeyboard: Bool - public let formatMenuAvailability: FormatMenuAvailability - public let lockedFormatAction: () -> Void public let present: (ViewController) -> Void public let paste: (PasteData) -> Void @@ -102,8 +94,6 @@ public final class TextFieldComponent: Component { textColor: UIColor, insets: UIEdgeInsets, hideKeyboard: Bool, - formatMenuAvailability: FormatMenuAvailability, - lockedFormatAction: @escaping () -> Void, present: @escaping (ViewController) -> Void, paste: @escaping (PasteData) -> Void ) { @@ -114,8 +104,6 @@ public final class TextFieldComponent: Component { self.textColor = textColor self.insets = insets self.hideKeyboard = hideKeyboard - self.formatMenuAvailability = formatMenuAvailability - self.lockedFormatAction = lockedFormatAction self.present = present self.paste = paste } @@ -139,9 +127,6 @@ public final class TextFieldComponent: Component { if lhs.hideKeyboard != rhs.hideKeyboard { return false } - if lhs.formatMenuAvailability != rhs.formatMenuAvailability { - return false - } return true } @@ -402,22 +387,6 @@ public final class TextFieldComponent: Component { return UIMenu(children: suggestedActions) } let strings = component.strings - - if case .none = component.formatMenuAvailability { - return UIMenu(children: suggestedActions) - } - - if case .locked = component.formatMenuAvailability { - var updatedActions = suggestedActions - let formatAction = UIAction(title: strings.TextFormat_Format, image: nil) { [weak self] action in - if let self { - self.component?.lockedFormatAction() - } - } - updatedActions.insert(formatAction, at: 1) - return UIMenu(children: updatedActions) - } - var actions: [UIAction] = [ UIAction(title: strings.TextFormat_Bold, image: nil) { [weak self] action in if let self {