Explorar o código

deduplicate code in GalleryViewController

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
9a524745d9
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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
     }