浏览代码

deduplicate code in GalleryViewController

cyberta 4 年之前
父节点
当前提交
9a524745d9
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      deltachat-ios/Controller/GalleryViewController.swift

+ 1 - 2
deltachat-ios/Controller/GalleryViewController.swift

@@ -184,14 +184,13 @@ extension GalleryViewController: UICollectionViewDataSource, UICollectionViewDel
         var item: GalleryItem
         if let galleryItem = items[indexPath.row] {
             item = galleryItem
-            galleryCell.update(item: item)
         } else {
             let message = dcContext.getMessage(id: msgId)
             let galleryItem = GalleryItem(msg: message)
             items[indexPath.row] = galleryItem
             item = galleryItem
-            galleryCell.update(item: item)
         }
+        galleryCell.update(item: item)
         UIMenuController.shared.setMenuVisible(false, animated: true)
         return galleryCell
     }