This commit is contained in:
Ryan Zhao 2022-04-04 16:10:28 +10:00
parent 43ca54c0a0
commit 77c00b6c37

View file

@ -379,7 +379,7 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
}
collectionView.allowsMultipleSelection = delegate.isInBatchSelectMode
collectionView.reloadData()
reloadDataAndRestoreSelection()
}
func clearCollectionViewSelection() {
@ -551,12 +551,7 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
let assetItem = photoCollectionContents.assetItem(at: indexPath.item, photoMediaSize: photoMediaSize)
cell.configure(item: assetItem)
let isSelected = delegate.imagePicker(self, isAssetSelected: assetItem.asset)
if isSelected {
cell.isSelected = isSelected
} else {
cell.isSelected = isSelected
}
cell.isSelected = delegate.imagePicker(self, isAssetSelected: assetItem.asset)
return cell
}