Explorar o código

fix send button state after video draft has been added

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
5c0f0cae64
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      deltachat-ios/Chat/Views/MediaPreview.swift

+ 2 - 0
deltachat-ios/Chat/Views/MediaPreview.swift

@@ -52,6 +52,7 @@ class MediaPreview: DraftPreview {
             if let image = ThumbnailCache.shared.restoreImage(key: path) {
                 self.contentImageView.image = image
                 self.setAspectRatio(image: image)
+                self.delegate?.onAttachmentAdded()
             } else {
                 DispatchQueue.global(qos: .userInteractive).async {
                     let thumbnailImage = DcUtils.generateThumbnailFromVideo(url: URL(fileURLWithPath: path, isDirectory: false))
@@ -61,6 +62,7 @@ class MediaPreview: DraftPreview {
                             self.contentImageView.image = thumbnailImage
                             self.setAspectRatio(image: thumbnailImage)
                             ThumbnailCache.shared.storeImage(image: thumbnailImage, key: path)
+                            self.delegate?.onAttachmentAdded()
                         }
                     }
                 }