From 3e032f55cd080947a6e0efe8d291129cc5161e50 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 10 Dec 2018 10:25:41 -0700 Subject: [PATCH] clear selectedIds in sync with deselection --- .../ViewControllers/PhotoLibrary/ImagePickerController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Signal/src/ViewControllers/PhotoLibrary/ImagePickerController.swift b/Signal/src/ViewControllers/PhotoLibrary/ImagePickerController.swift index 46c555f2e..4ab7e5203 100644 --- a/Signal/src/ViewControllers/PhotoLibrary/ImagePickerController.swift +++ b/Signal/src/ViewControllers/PhotoLibrary/ImagePickerController.swift @@ -369,7 +369,12 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat return } + selectedIds = Set() collectionView.indexPathsForSelectedItems?.forEach { collectionView.deselectItem(at: $0, animated: false)} + + if isInBatchSelectMode { + updateDoneButton() + } } // MARK: - PhotoLibraryDelegate