Don't show duplicate posts when importing
This commit is contained in:
parent
b610f02f2e
commit
a684d788f9
1 changed files with 0 additions and 5 deletions
|
@ -48,11 +48,6 @@ class HomeViewController: UIViewController, UIDocumentPickerDelegate {
|
||||||
post.setValue(path.lastPathComponent, forKeyPath: "name")
|
post.setValue(path.lastPathComponent, forKeyPath: "name")
|
||||||
|
|
||||||
try managedContext.save()
|
try managedContext.save()
|
||||||
collectionManager?.posts.append(post)
|
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
|
||||||
self.collectionView.reloadData()
|
|
||||||
}
|
|
||||||
} catch let error as NSError {
|
} catch let error as NSError {
|
||||||
print("Could not save. \(error), \(error.userInfo)")
|
print("Could not save. \(error), \(error.userInfo)")
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue