فهرست منبع

coding

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 سال پیش
والد
کامیت
39e6a68730
1فایلهای تغییر یافته به همراه22 افزوده شده و 0 حذف شده
  1. 22 0
      iOSClient/Main/Create cloud/NCUploadAssets.swift

+ 22 - 0
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -190,12 +190,31 @@ extension NCUploadAssets: NCSelectDelegate {
     }
 }
 
+extension NCUploadAssets: NCCreateFormUploadConflictDelegate {
+
+    func dismissCreateFormUploadConflict(metadatas: [tableMetadata]?) {
+
+        /*
+        if let metadata = metadatas?.first {
+            self.showHUD.toggle()
+            createPDF(metadata: metadata) { error in
+                if !error {
+                    self.showHUD.toggle()
+                    NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterDismissScanDocument)
+                }
+            }
+        }
+        */
+    }
+}
+
 // MARK: - View
 
 struct UploadAssetsView: View {
 
     @State var fileName: String = CCUtility.getFileNameMask(NCGlobal.shared.keyFileNameMask)
     @State var isPresentedSelect = false
+    @State var isPresentedUploadConflict = false
 
     @ObservedObject var uploadAssets: NCUploadAssets
 
@@ -276,6 +295,9 @@ struct UploadAssetsView: View {
         .sheet(isPresented: $isPresentedSelect) {
             NCSelectViewControllerRepresentable(delegate: uploadAssets)
         }
+        .sheet(isPresented: $isPresentedUploadConflict) {
+            NCUploadConflictRepresentedView(delegate: uploadAssets, serverUrl: uploadAssets.serverUrl, metadatasUploadInConflict: [uploadAssets.metadata])
+        }
     }
 }