瀏覽代碼

Merge pull request #1059 from deltachat/fix_send_button_state_4_video_drafts

fix send button state after video draft has been added
bjoern 4 年之前
父節點
當前提交
db0deb7901
共有 1 個文件被更改,包括 2 次插入0 次删除
  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()
                         }
                     }
                 }