|
@@ -46,7 +46,7 @@ import Foundation
|
|
|
if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
if let ocId = userInfo["ocId"] as? String, let serverUrl = userInfo["serverUrl"] as? String {
|
|
|
|
|
|
- NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: serverUrl, ocId: ocId, action: Int32(k_action_MOD))
|
|
|
+ NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":ocId,"serverUrl":serverUrl])
|
|
|
appDelegate.updateApplicationIconBadgeNumber()
|
|
|
}
|
|
|
}
|
|
@@ -160,8 +160,6 @@ import Foundation
|
|
|
NCManageDatabase.sharedInstance.deleteMetadata(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
|
NCManageDatabase.sharedInstance.deleteLocalFile(predicate: NSPredicate(format: "ocId == %@", metadata.ocId))
|
|
|
|
|
|
- NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: metadata.serverUrl, ocId: metadata.ocId, action: Int32(k_action_DEL))
|
|
|
-
|
|
|
} else {
|
|
|
NCContentPresenter.shared.messageNotification("_download_file_", description: errorDescription, delay: TimeInterval(k_dismissAfterSecond), type: NCContentPresenter.messageType.error, errorCode: errorCode)
|
|
|
}
|
|
@@ -179,7 +177,7 @@ import Foundation
|
|
|
if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
if let ocId = userInfo["ocId"] as? String, let serverUrl = userInfo["serverUrl"] as? String, let _ = userInfo["task"] as? URLSessionUploadTask {
|
|
|
|
|
|
- NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: serverUrl, ocId: ocId, action: Int32(k_action_MOD))
|
|
|
+ NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":ocId,"serverUrl":serverUrl])
|
|
|
appDelegate.updateApplicationIconBadgeNumber()
|
|
|
}
|
|
|
}
|
|
@@ -190,8 +188,8 @@ import Foundation
|
|
|
if let userInfo = notification.userInfo as NSDictionary? {
|
|
|
if let metadata = userInfo["metadata"] as? tableMetadata, let errorCode = userInfo["errorCode"] as? Int, let errorDescription = userInfo["errorDescription"] as? String {
|
|
|
|
|
|
- NCMainCommon.sharedInstance.reloadDatasource(ServerUrl: metadata.serverUrl, ocId: metadata.ocId, action: Int32(k_action_MOD))
|
|
|
-
|
|
|
+ NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_reloadDataSource), object: nil, userInfo: ["ocId":metadata.ocId,"serverUrl":metadata.serverUrl])
|
|
|
+
|
|
|
if metadata.account == appDelegate.activeAccount {
|
|
|
if errorCode == 0 {
|
|
|
appDelegate.startLoadAutoUpload()
|