Browse Source

Update present information error

marinofaggiana 5 years ago
parent
commit
e5844e1ba0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      iOSClient/Utility/NCContentPresenter.swift

+ 6 - 1
iOSClient/Utility/NCContentPresenter.swift

@@ -67,7 +67,12 @@ class NCContentPresenter: NSObject {
             default:
             default:
                 var description = description
                 var description = description
                 if description == nil { description = "" }
                 if description == nil { description = "" }
-                self.flatTop(title: NSLocalizedString(title, comment: ""), description: NSLocalizedString(description!, comment: ""), delay: delay, imageName: nil, type: type, name: "\(errorCode)")
+                if type == messageType.error {
+                    description = NSLocalizedString("_error_", comment: "") + ": \(errorCode), " + NSLocalizedString(description!, comment: "")
+                } else {
+                    description = NSLocalizedString(description!, comment: "")
+                }
+                self.flatTop(title: NSLocalizedString(title, comment: ""), description: description!, delay: delay, imageName: nil, type: type, name: "\(errorCode)")
             }
             }
         }
         }
     }
     }