Преглед изворни кода

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
     }