Renamed the DocumentPicker component as SelectDocumentPicker for the Browse module.
This commit is contained in:
parent
b0bba71288
commit
7d737cb12b
@ -1,5 +1,5 @@
|
||||
//
|
||||
// DocumentPicker.swift
|
||||
// SelectDocumentPicker.swift
|
||||
// Browse
|
||||
//
|
||||
// Created by Javier Cicchelli on 17/12/2022.
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
|
||||
struct DocumentPicker: UIViewControllerRepresentable {
|
||||
struct SelectDocumentPicker: UIViewControllerRepresentable {
|
||||
|
||||
// MARK: Type aliases
|
||||
|
||||
@ -55,20 +55,21 @@ struct DocumentPicker: UIViewControllerRepresentable {
|
||||
func makeCoordinator() -> Coordinator {
|
||||
.init(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Coordinators
|
||||
|
||||
extension DocumentPicker {
|
||||
extension SelectDocumentPicker {
|
||||
class Coordinator: NSObject, UIDocumentPickerDelegate {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
private var parent: DocumentPicker
|
||||
private var parent: SelectDocumentPicker
|
||||
|
||||
// MARK: Initialisers
|
||||
|
||||
init(_ parent: DocumentPicker) {
|
||||
init(_ parent: SelectDocumentPicker) {
|
||||
self.parent = parent
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ struct UploadView: View {
|
||||
// MARK: Body
|
||||
|
||||
var body: some View {
|
||||
DocumentPicker { urls in
|
||||
SelectDocumentPicker { urls in
|
||||
Task { await addFile(from: urls) }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user