diff --git a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift index 501e9b2d..28b2e07a 100644 --- a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift +++ b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift @@ -201,6 +201,10 @@ class NewFeedViewController: SegueViewController { choosePromptLabel.hidden = (newValue != nil) } } + + deinit { + println("NewFeed deinit") + } override func viewDidLoad() { super.viewDidLoad() diff --git a/Yep/Views/Cells/Feed/FeedAnyImagesCell.swift b/Yep/Views/Cells/Feed/FeedAnyImagesCell.swift index 5f569858..888f7edd 100644 --- a/Yep/Views/Cells/Feed/FeedAnyImagesCell.swift +++ b/Yep/Views/Cells/Feed/FeedAnyImagesCell.swift @@ -156,6 +156,10 @@ extension FeedAnyImagesCell: UICollectionViewDataSource, UICollectionViewDelegat func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { + guard let firstAttachment = attachments.first where !firstAttachment.isTemporary else { + return + } + let cell = collectionView.cellForItemAtIndexPath(indexPath) as! FeedMediaCell let transitionView = cell.imageView diff --git a/Yep/Views/Cells/Feed/FeedBiggerImageCell.swift b/Yep/Views/Cells/Feed/FeedBiggerImageCell.swift index 0cb4be0f..992eb6a2 100644 --- a/Yep/Views/Cells/Feed/FeedBiggerImageCell.swift +++ b/Yep/Views/Cells/Feed/FeedBiggerImageCell.swift @@ -93,6 +93,10 @@ class FeedBiggerImageCell: FeedBasicCell { @objc private func tap(sender: UITapGestureRecognizer) { + guard let firstAttachment = feed?.imageAttachments?.first where !firstAttachment.isTemporary else { + return + } + if let attachments = feed?.imageAttachments { tapMediaAction?(transitionView: biggerImageView, image: biggerImageView.image, attachments: attachments, index: 0) } diff --git a/Yep/Views/Cells/Feed/FeedNormalImagesCell.swift b/Yep/Views/Cells/Feed/FeedNormalImagesCell.swift index 32c2ed51..16dead3d 100644 --- a/Yep/Views/Cells/Feed/FeedNormalImagesCell.swift +++ b/Yep/Views/Cells/Feed/FeedNormalImagesCell.swift @@ -142,6 +142,10 @@ class FeedNormalImagesCell: FeedBasicCell { @objc private func tap(sender: UITapGestureRecognizer) { + guard let firstAttachment = feed?.imageAttachments?.first where !firstAttachment.isTemporary else { + return + } + if let imageView = sender.view as? UIImageView, index = imageViews.indexOf(imageView) { if let attachments = feed?.imageAttachments {