diff --git a/Sources/Images/ImagesController.swift b/Sources/Images/ImagesController.swift index c70a3160..48aec408 100644 --- a/Sources/Images/ImagesController.swift +++ b/Sources/Images/ImagesController.swift @@ -224,6 +224,13 @@ extension ImagesController: UICollectionViewDataSource, UICollectionViewDelegate if cart.images.contains(item) { cart.remove(item) } else { + // In single image selection mode, remove selected image when + // another image is clicked + if Config.Camera.imageLimit == 1 && cart.images.count == 1 + { + cart.remove(cart.images[0]) + } + if Config.Camera.imageLimit == 0 || Config.Camera.imageLimit > cart.images.count{ cart.add(item) }