marinofaggiana 3 years ago
parent
commit
ff54386491

+ 1 - 1
iOSClient/Networking/NCNetworking.swift

@@ -491,7 +491,7 @@ import Queuer
         
             NCManageDatabase.shared.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
             
-            completion(404, NSLocalizedString("_error_not_found_", value: "The requested resource could not be found", comment: ""))
+            completion(NCGlobal.shared.errorResourceNotFound, NSLocalizedString("_error_not_found_", value: "The requested resource could not be found", comment: ""))
         
         } else {
         

+ 2 - 2
iOSClient/UserStatus/NCUserStatus.swift

@@ -181,7 +181,7 @@ class NCUserStatus: UIViewController {
     }
     
     func dismissIfError(_ errorCode: Int, errorDescription: String) {
-        if errorCode != 0 && errorCode != 404 {
+        if errorCode != 0 && errorCode != NCGlobal.shared.errorResourceNotFound {
             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
                 self.dismiss(animated: true) {
                     NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode, forced: true)
@@ -345,7 +345,7 @@ class NCUserStatus: UIViewController {
         
         NCCommunication.shared.getUserStatus { account, clearAt, icon, message, messageId, messageIsPredefined, status, statusIsUserDefined, userId, errorCode, errorDescription in
             
-            if errorCode == 0 || errorCode == 404 {
+            if errorCode == 0 || errorCode == NCGlobal.shared.errorResourceNotFound {
                 
                 if icon != nil {
                     self.statusMessageEmojiTextField.text = icon