marinofaggiana 4 years ago
parent
commit
665ee128f5

+ 1 - 1
iOSClient/Settings/NCManageAutoUploadFileName.swift

@@ -170,7 +170,7 @@ class NCManageAutoUploadFileName: XLFormViewController {
                     
                     self.reloadFormRow(formRow)
                     
-                    NCContentPresenter.shared.messageNotification("_info_", description: "_forbidden_characters_", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.info, errorCode: Int(k_CCErrorInternalError), forced: true)
+                    NCContentPresenter.shared.messageNotification("_info_", description: "_forbidden_characters_", delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.info, errorCode: Int(k_CCErrorCharactersForbidden), forced: true)
                 }
             }
             

+ 8 - 7
iOSClient/Utility/NCContentPresenter.swift

@@ -68,6 +68,7 @@ class NCContentPresenter: NSObject {
                        
         // No notification message
         if forced == false {
+            
             if errorCode == -999 { return }         // Cancelled transfer
             else if errorCode == 200 { return }     // Transfer stopped
             else if errorCode == 207 { return }     // WebDAV multistatus
@@ -75,13 +76,13 @@ class NCContentPresenter: NSObject {
             else if errorCode == -1001 { return }   // Time out
             else if errorCode == -1005 { return }   // Connection lost
             else if errorCode == 0 && type == messageType.error { return }
-        }
-        
-        // No repeat message for:
-        if errorCode == lastErrorCode {
-            if errorCode ==  Int(CFNetworkErrors.cfurlErrorNotConnectedToInternet.rawValue) { return }
-        } else {
-            lastErrorCode = errorCode
+            
+            // No repeat message for:
+            if errorCode == lastErrorCode {
+                if errorCode ==  Int(CFNetworkErrors.cfurlErrorNotConnectedToInternet.rawValue) { return }
+            } else {
+                lastErrorCode = errorCode
+            }
         }
         
         DispatchQueue.main.async {