mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -3088,15 +3088,12 @@ public final class DrawingToolsInteraction {
|
||||
var isVideo = false
|
||||
var isAdditional = false
|
||||
var isMessage = false
|
||||
var isLink = false
|
||||
if let entity = entityView.entity as? DrawingStickerEntity {
|
||||
if case let .dualVideoReference(isAdditionalValue) = entity.content {
|
||||
isVideo = true
|
||||
isAdditional = isAdditionalValue
|
||||
} else if case .message = entity.content {
|
||||
isMessage = true
|
||||
} else if case .link = entity.content {
|
||||
isLink = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3115,7 +3112,7 @@ public final class DrawingToolsInteraction {
|
||||
}
|
||||
}))
|
||||
}
|
||||
if entityView is DrawingLocationEntityView || isLink {
|
||||
if entityView is DrawingLocationEntityView || entityView is DrawingLinkEntityView {
|
||||
actions.append(ContextMenuAction(content: .text(title: presentationData.strings.Paint_Edit, accessibilityLabel: presentationData.strings.Paint_Edit), action: { [weak self, weak entityView] in
|
||||
if let self, let entityView {
|
||||
self.editEntity(entityView.entity)
|
||||
@@ -3129,7 +3126,7 @@ public final class DrawingToolsInteraction {
|
||||
self.entitiesView.selectEntity(entityView.entity)
|
||||
}
|
||||
}))
|
||||
} else if (entityView is DrawingStickerEntityView || entityView is DrawingBubbleEntityView) && !isVideo && !isMessage && !isLink {
|
||||
} else if (entityView is DrawingStickerEntityView || entityView is DrawingBubbleEntityView) && !isVideo && !isMessage {
|
||||
actions.append(ContextMenuAction(content: .text(title: presentationData.strings.Paint_Flip, accessibilityLabel: presentationData.strings.Paint_Flip), action: { [weak self] in
|
||||
if let self {
|
||||
self.flipSelectedEntity()
|
||||
|
||||
Reference in New Issue
Block a user