Fix in image picker filter to prevent live photos and videos to be picked

This commit is contained in:
Arnfried Griesert
2024-03-06 08:12:30 +01:00
parent 99e5488ff0
commit b6a9d8ba56

View File

@@ -126,7 +126,7 @@ final class SingleImagePickerPresenter: NSObject {
if BWIBuildSettings.shared.useNewPhotosPickerAPI {
var configuration = PHPickerConfiguration(photoLibrary: PHPhotoLibrary.shared())
configuration.filter = PHPickerFilter.any(of: [.images, .videos])
configuration.filter = .images
configuration.preferredAssetRepresentationMode = .compatible
configuration.selection = .default
configuration.selectionLimit = 1
@@ -207,6 +207,8 @@ extension SingleImagePickerPresenter: PHPickerViewControllerDelegate {
}
}
}
} else if itemProvider.canLoadObject(ofClass: PHLivePhoto.self) {
MXLog.error("itemProvider.canLoadObject(ofClass: PHLivePhoto.self)")
} else {
self.delegate?.singleImagePickerPresenterDidCancel(self)
}