From a684d788f97d2a00b3a2595d6e3db7bd7e28fe01 Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Sun, 24 May 2020 23:52:56 -0400 Subject: [PATCH] Don't show duplicate posts when importing --- Gallery/HomeViewController.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gallery/HomeViewController.swift b/Gallery/HomeViewController.swift index c54fd97..caf85c4 100644 --- a/Gallery/HomeViewController.swift +++ b/Gallery/HomeViewController.swift @@ -48,11 +48,6 @@ class HomeViewController: UIViewController, UIDocumentPickerDelegate { post.setValue(path.lastPathComponent, forKeyPath: "name") try managedContext.save() - collectionManager?.posts.append(post) - - DispatchQueue.main.async { - self.collectionView.reloadData() - } } catch let error as NSError { print("Could not save. \(error), \(error.userInfo)") }