Various improvements

This commit is contained in:
Ilya Laktyushin
2023-07-07 07:02:54 +02:00
parent e6e7d52ebf
commit dc0d4d25bf
20 changed files with 789 additions and 609 deletions

View File

@@ -588,6 +588,18 @@ public final class EntityKeyboardComponent: Component {
}
).minSize(CGSize(width: 38.0, height: 38.0)))))
}
if let addImage = component.stickerContent?.inputInteractionHolder.inputInteraction?.addImage {
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "stickers", component: AnyComponent(Button(
content: AnyComponent(BundleIconComponent(
name: "Media Editor/AddImage",
tintColor: component.theme.chat.inputMediaPanel.panelIconColor,
maxSize: nil
)),
action: {
addImage()
}
).minSize(CGSize(width: 38.0, height: 38.0)))))
}
}
let deleteBackwards = component.emojiContent?.inputInteractionHolder.inputInteraction?.deleteBackwards
@@ -689,9 +701,8 @@ public final class EntityKeyboardComponent: Component {
component.switchToTextInput()
}
).minSize(CGSize(width: 38.0, height: 38.0)))))
}
if let addImage = component.stickerContent?.inputInteractionHolder.inputInteraction?.addImage {
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "image", component: AnyComponent(Button(
} else if let addImage = component.emojiContent?.inputInteractionHolder.inputInteraction?.addImage {
contentAccessoryLeftButtons.append(AnyComponentWithIdentity(id: "emoji", component: AnyComponent(Button(
content: AnyComponent(BundleIconComponent(
name: "Media Editor/AddImage",
tintColor: component.theme.chat.inputMediaPanel.panelIconColor,