mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[WIP] Stickers editor
This commit is contained in:
@@ -1401,7 +1401,7 @@ final class AvatarEditorScreenComponent: Component {
|
||||
try? backgroundImage.jpegData(compressionQuality: 0.8)?.write(to: tempUrl)
|
||||
|
||||
let drawingSize = CGSize(width: 1920.0, height: 1920.0)
|
||||
let entity = DrawingStickerEntity(content: .file(file, .sticker))
|
||||
let entity = DrawingStickerEntity(content: .file(.standalone(media: file), .sticker))
|
||||
entity.referenceDrawingSize = drawingSize
|
||||
entity.position = CGPoint(x: drawingSize.width / 2.0, y: drawingSize.height / 2.0)
|
||||
entity.scale = 3.3
|
||||
@@ -1409,7 +1409,8 @@ final class AvatarEditorScreenComponent: Component {
|
||||
var fileId: Int64 = 0
|
||||
var stickerPackId: Int64 = 0
|
||||
var stickerPackAccessHash: Int64 = 0
|
||||
if case let .file(file, _) = entity.content {
|
||||
if case let .file(fileReference, _) = entity.content {
|
||||
let file = fileReference.media
|
||||
if file.isCustomEmoji {
|
||||
fileId = file.fileId.id
|
||||
} else if file.isAnimatedSticker {
|
||||
|
||||
Reference in New Issue
Block a user