Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iOSClient/Shares/NCShares.swift')
-rw-r--r--iOSClient/Shares/NCShares.swift17
1 files changed, 12 insertions, 5 deletions
diff --git a/iOSClient/Shares/NCShares.swift b/iOSClient/Shares/NCShares.swift
index 98bcc4a4c..668fc2239 100644
--- a/iOSClient/Shares/NCShares.swift
+++ b/iOSClient/Shares/NCShares.swift
@@ -22,7 +22,7 @@
//
import UIKit
-import NCCommunication
+import NextcloudKit
class NCShares: NCCollectionViewCommon {
@@ -42,6 +42,12 @@ class NCShares: NCCollectionViewCommon {
emptyDescription = "_tutorial_list_shares_view_"
}
+ override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+
+ navigationController?.setFileAppreance()
+ }
+
// MARK: - DataSource + NC Endpoint
override func reloadDataSource(forced: Bool = true) {
@@ -82,15 +88,16 @@ class NCShares: NCCollectionViewCommon {
isReloadDataSourceNetworkInProgress = true
collectionView?.reloadData()
- // Shares network
- NCCommunication.shared.readShares(parameters: NCCShareParameter(), queue: NCCommunicationCommon.shared.backgroundQueue) { account, shares, errorCode, errorDescription in
+ let options = NKRequestOptions(queue: NKCommon.shared.backgroundQueue)
+
+ NextcloudKit.shared.readShares(parameters: NKShareParameter(), options: options) { account, shares, data, error in
DispatchQueue.main.async {
self.refreshControl.endRefreshing()
self.isReloadDataSourceNetworkInProgress = false
}
- if errorCode == 0 {
+ if error == .success {
NCManageDatabase.shared.deleteTableShare(account: account)
if shares != nil {
@@ -103,7 +110,7 @@ class NCShares: NCCollectionViewCommon {
DispatchQueue.main.async {
self.collectionView?.reloadData()
- NCContentPresenter.shared.messageNotification("_share_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)
+ NCContentPresenter.shared.showError(error: error)
}
}
}