Эх сурвалжийг харах

fix hud

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 жил өмнө
parent
commit
1f350872b3

+ 2 - 2
iOSClient/Main/NCActionCenter.swift

@@ -205,8 +205,8 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec
 
         NextcloudKit.shared.getFileFromFileId(fileId: fileId) { account, file, _, error in
 
+            hud.dismiss()
             if error != .success {
-                hud.dismiss()
                 NCContentPresenter.shared.showError(error: error)
             } else if let file = file {
 
@@ -220,6 +220,7 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec
                 if metadata.isMovie {
                     NCViewer.shared.view(viewController: viewController, metadata: metadata, metadatas: [metadata], imageIcon: nil)
                 } else {
+                    hud.show(in: hudView)
                     NextcloudKit.shared.download(serverUrlFileName: serverUrlFileName, fileNameLocalPath: fileNameLocalPath, requestHandler: { request in
                         downloadRequest = request
                     }, taskHandler: { _ in
@@ -234,7 +235,6 @@ class NCActionCenter: NSObject, UIDocumentInteractionControllerDelegate, NCSelec
                     }
                 }
             } else {
-                hud.dismiss()
                 let error = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_file_not_found_")
                 NCContentPresenter.shared.showError(error: error)
             }

+ 0 - 2
iOSClient/Notification/NCNotification.swift

@@ -105,8 +105,6 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
 
     override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
 
-        tableView.deselectRow(at: indexPath, animated: true)
-
         let notification = notifications[indexPath.row]
 
         if notification.app == "files_sharing" {