@@ -401,33 +401,27 @@ public final class EntityKeyboardComponent: Component {
401401 ) ) ) )
402402 contentIcons. append ( PagerComponentContentIcon ( id: " masks " , imageName: " Chat/Input/Media/EntityInputMasksIcon " , title: component. strings. EmojiInput_TabMasks) )
403403 if let _ = component. maskContent? . inputInteractionHolder. inputInteraction? . openStickerSettings {
404- contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " masks " , component: AnyComponent ( Button (
405- content: AnyComponent ( BundleIconComponent (
406- name: " Chat/Input/Media/EntityInputSettingsIcon " ,
407- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
408- maxSize: nil
409- ) ) ,
404+ contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " masks " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
405+ icon: " Chat/Input/Media/EntityInputSettingsIcon " ,
406+ color: component. theme. chat. inputPanel. inputControlColor,
410407 action: {
411408 maskContent. inputInteractionHolder. inputInteraction? . openStickerSettings ? ( )
412409 }
413- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
410+ ) ) ) )
414411 }
415412 }
416413
417414 if let gifContent = component. gifContent {
418415 contents. append ( AnyComponentWithIdentity ( id: " gifs " , component: AnyComponent ( gifContent) ) )
419416 contentIcons. append ( PagerComponentContentIcon ( id: " gifs " , imageName: " Chat/Input/Media/EntityInputGifsIcon " , title: component. strings. EmojiInput_TabGifs) )
420417 if let addImage = component. stickerContent? . inputInteractionHolder. inputInteraction? . addImage {
421- contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " gifs " , component: AnyComponent ( Button (
422- content: AnyComponent ( BundleIconComponent (
423- name: " Media Editor/AddImage " ,
424- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
425- maxSize: nil
426- ) ) ,
418+ contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " gifs " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
419+ icon: " Media Editor/AddImage " ,
420+ color: component. theme. chat. inputPanel. inputControlColor,
427421 action: {
428422 addImage ( )
429423 }
430- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
424+ ) ) ) )
431425 }
432426 }
433427
@@ -541,28 +535,22 @@ public final class EntityKeyboardComponent: Component {
541535 ) ) ) )
542536 contentIcons. append ( PagerComponentContentIcon ( id: " stickers " , imageName: " Chat/Input/Media/EntityInputStickersIcon " , title: component. strings. EmojiInput_TabStickers) )
543537 if let _ = component. stickerContent? . inputInteractionHolder. inputInteraction? . openStickerSettings {
544- contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " stickers " , component: AnyComponent ( Button (
545- content: AnyComponent ( BundleIconComponent (
546- name: " Chat/Input/Media/EntityInputSettingsIcon " ,
547- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
548- maxSize: nil
549- ) ) ,
538+ contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " stickers " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
539+ icon: " Chat/Input/Media/EntityInputSettingsIcon " ,
540+ color: component. theme. chat. inputPanel. inputControlColor,
550541 action: {
551542 stickerContent. inputInteractionHolder. inputInteraction? . openStickerSettings ? ( )
552543 }
553- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
544+ ) ) ) )
554545 }
555546 if let addImage = component. stickerContent? . inputInteractionHolder. inputInteraction? . addImage {
556- contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " stickers " , component: AnyComponent ( Button (
557- content: AnyComponent ( BundleIconComponent (
558- name: " Media Editor/AddImage " ,
559- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
560- maxSize: nil
561- ) ) ,
547+ contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " stickers " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
548+ icon: " Media Editor/AddImage " ,
549+ color: component. theme. chat. inputPanel. inputControlColor,
562550 action: {
563551 addImage ( )
564552 }
565- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
553+ ) ) ) )
566554 }
567555 }
568556
@@ -659,48 +647,40 @@ public final class EntityKeyboardComponent: Component {
659647 ) ) ) )
660648 contentIcons. append ( PagerComponentContentIcon ( id: " emoji " , imageName: " Chat/Input/Media/EntityInputEmojiIcon " , title: component. strings. EmojiInput_TabEmoji) )
661649 if let _ = deleteBackwards {
662- contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( Button (
663- content: AnyComponent ( BundleIconComponent (
664- name: " Chat/Input/Media/EntityInputGlobeIcon " ,
665- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
666- maxSize: nil
667- ) ) ,
650+ contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
651+ icon: " Chat/Input/Media/EntityInputGlobeIcon " ,
652+ color: component. theme. chat. inputPanel. inputControlColor,
668653 action: { [ weak self] in
669654 guard let strongSelf = self , let component = strongSelf. component else {
670655 return
671656 }
672657 component. switchToTextInput ( )
673658 }
674- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
659+ ) ) ) )
675660 } else if let addImage = component. emojiContent? . inputInteractionHolder. inputInteraction? . addImage {
676- contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( Button (
677- content: AnyComponent ( BundleIconComponent (
678- name: " Media Editor/AddImage " ,
679- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
680- maxSize: nil
681- ) ) ,
661+ contentAccessoryLeftButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
662+ icon: " Media Editor/AddImage " ,
663+ color: component. theme. chat. inputPanel. inputControlColor,
682664 action: {
683665 addImage ( )
684666 }
685- ) . minSize ( CGSize ( width : 38.0 , height : 38.0 ) ) ) ) )
667+ ) ) ) )
686668 }
687669 }
688670
689671 if let _ = deleteBackwards {
690- contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( Button (
691- content: AnyComponent ( BundleIconComponent (
692- name: " Chat/Input/Media/EntityInputClearIcon " ,
693- tintColor: component. theme. chat. inputMediaPanel. panelIconColor,
694- maxSize: nil
695- ) ) ,
672+ contentAccessoryRightButtons. append ( AnyComponentWithIdentity ( id: " emoji " , component: AnyComponent ( EntityKeyboardBottomPanelButton (
673+ icon: " Chat/Input/Media/EntityInputClearIcon " ,
674+ color: component. theme. chat. inputPanel. inputControlColor,
696675 action: {
697676 deleteBackwards ? ( )
698677 AudioServicesPlaySystemSound ( 1155 )
678+ } ,
679+ holdAction: {
680+ deleteBackwards ? ( )
681+ AudioServicesPlaySystemSound ( 1155 )
699682 }
700- ) . withHoldAction ( { _ in
701- deleteBackwards ? ( )
702- AudioServicesPlaySystemSound ( 1155 )
703- } ) . minSize ( CGSize ( width: 38.0 , height: 38.0 ) ) ) ) )
683+ ) ) ) )
704684 }
705685
706686 let panelHideBehavior : PagerComponentPanelHideBehavior
0 commit comments