Jelajahi Sumber

fix send button state after video draft has been added

cyberta 4 tahun lalu
induk
melakukan
5c0f0cae64
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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()
                         }
                     }
                 }