|
@@ -224,11 +224,17 @@ class NCDetailViewController: UIViewController {
|
|
|
if self.view?.window == nil { return }
|
|
|
|
|
|
if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
- if let metadata = userInfo["metadata"] as? tableMetadata, let serverUrlTo = userInfo["serverUrlTo"] as? String, let errorCode = userInfo["errorCode"] as? Int, let errorDescription = userInfo["errorDescription"] as? String {
|
|
|
+ if let metadata = userInfo["metadata"] as? tableMetadata, let metadataNew = userInfo["metadataNew"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int, let errorDescription = userInfo["errorDescription"] as? String {
|
|
|
if metadata.account != self.metadata?.account { return }
|
|
|
|
|
|
if errorCode == 0 {
|
|
|
|
|
|
+ // OTHER
|
|
|
+ if (metadata.typeFile == k_metadataTypeFile_document || metadata.typeFile == k_metadataTypeFile_unknown) && metadataNew.ocId == self.metadata?.ocId {
|
|
|
+
|
|
|
+ self.metadata = metadataNew
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: errorCode)
|
|
|
}
|