Various fixes

This commit is contained in:
Ilya Laktyushin
2023-06-24 16:19:01 +02:00
parent c90748c8d4
commit 36e4eb858b
4 changed files with 38 additions and 13 deletions

View File

@@ -1003,11 +1003,11 @@ private final class DrawingScreenComponent: CombinedComponent {
self.updateEntitiesPlayback.invoke(false)
let controller = StickerPickerScreen(context: self.context, inputData: self.stickerPickerInputData.get())
controller.completion = { [weak self] file in
controller.completion = { [weak self] content in
self?.updateEntitiesPlayback.invoke(true)
if let file = file {
let stickerEntity = DrawingStickerEntity(content: .file(file))
if let content {
let stickerEntity = DrawingStickerEntity(content: content)
self?.insertEntity.invoke(stickerEntity)
} else {
self?.updateCurrentMode(.drawing)