Skip to content

Commit 894d5cd

Browse files
committed
Add ePub in allowed attachment picker types
1 parent 743e3fc commit 894d5cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Zotero/Scenes/Detail/DetailCoordinator.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,11 @@ extension DetailCoordinator: DetailItemsCoordinatorDelegate {
818818
extension DetailCoordinator: DetailItemDetailCoordinatorDelegate {
819819
func showAttachmentPicker(save: @escaping ([URL]) -> Void) {
820820
guard let navigationController else { return }
821-
let controller = DocumentPickerViewController(forOpeningContentTypes: [.pdf, .png, .jpeg], asCopy: true)
821+
var contentTypes: [UTType] = [.pdf, .png, .jpeg]
822+
if FeatureGates.enabled.contains(.htmlEpubReader) {
823+
contentTypes.append(.epub)
824+
}
825+
let controller = DocumentPickerViewController(forOpeningContentTypes: contentTypes, asCopy: true)
822826
controller.popoverPresentationController?.sourceItem = navigationController.visibleViewController?.view
823827
controller.observable
824828
.observe(on: MainScheduler.instance)

0 commit comments

Comments
 (0)