浏览代码

reduce memory consumption of share extension by scaling down image thumbnail

cyberta 3 年之前
父节点
当前提交
bf2bb2c4e7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      DcShare/Helper/ShareAttachment.swift

+ 1 - 1
DcShare/Helper/ShareAttachment.swift

@@ -120,7 +120,7 @@ class ShareAttachment {
                 self.messages.append(msg)
                 self.delegate?.onAttachmentChanged()
                 if self.imageThumbnail == nil {
-                    self.imageThumbnail = result
+                    self.imageThumbnail = result.scaleDownImage(toMax: 96)
                     self.delegate?.onThumbnailChanged()
                 }
             }