Various fixes

This commit is contained in:
Ilya Laktyushin
2023-07-18 00:26:38 +02:00
parent 5afa9250aa
commit 47fbbbc026
4 changed files with 9 additions and 36 deletions

View File

@@ -215,13 +215,17 @@ public final class DrawingStickerEntityView: DrawingEntityView {
context.draw(image.cgImage!, in: imageRect)
}
var synchronous = false
if case let .image(_, type) = self.stickerEntity.content {
synchronous = type == .dualPhoto
}
self.imageNode.setSignal(.single({ arguments -> DrawingContext? in
let context = DrawingContext(size: arguments.drawingSize, opaque: false, clear: true)
context?.withFlippedContext({ ctx in
drawImageWithOrientation(image, size: arguments.drawingSize, in: ctx)
})
return context
}))
}), attemptSynchronously: synchronous)
self.setNeedsLayout()
} else if case let .video(videoPath, image, _) = self.stickerEntity.content {
let url = URL(fileURLWithPath: videoPath)