Skip to content

Commit

Permalink
feat: Ignore safe area
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Jun 9, 2023
1 parent 1e1b40c commit 70b9e5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Mail/Helpers/DocumentPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ struct DocumentPicker: UIViewControllerRepresentable {
}

func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
// TODO: Get completion
//parent.completion(urls)
if case let .selectContent(_, completion) = parent.pickerType {
completion(urls)
}
parent.dismiss()
}
}
Expand Down
4 changes: 3 additions & 1 deletion Mail/Views/New Message/ComposeMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,16 @@ struct ComposeMessageView: View {
.ignoresSafeArea()
}
.sheet(isPresented: $isShowingFileSelection) {
DocumentPicker(pickerType: .selectContent([.item]){ urls in
DocumentPicker(pickerType: .selectContent([.item]) { urls in
attachmentsManager.importAttachments(attachments: urls)
})
.ignoresSafeArea()
}
.sheet(isPresented: $isShowingPhotoLibrary) {
ImagePicker { results in
attachmentsManager.importAttachments(attachments: results)
}
.ignoresSafeArea()
}
.customAlert(isPresented: $alert.isShowing) {
switch alert.state {
Expand Down

0 comments on commit 70b9e5d

Please sign in to comment.