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:
authormarinofaggiana <ios@nextcloud.com>2022-08-04 14:31:27 +0300
committermarinofaggiana <ios@nextcloud.com>2022-08-04 14:31:27 +0300
commitfffc007eabb3212cfece5e00a5a78c2e0a3fa65a (patch)
tree07d7b903c2c98d26768b01ce710d95b5781a7bfb
parent9b52a80db43ffb6de14abe8cc83b7c8b86a35a6a (diff)
fix share_reshare_restricted
Signed-off-by: marinofaggiana <ios@nextcloud.com>
-rw-r--r--iOSClient/Main/NCFunctionCenter.swift17
1 files changed, 11 insertions, 6 deletions
diff --git a/iOSClient/Main/NCFunctionCenter.swift b/iOSClient/Main/NCFunctionCenter.swift
index 9c5551305..638a73989 100644
--- a/iOSClient/Main/NCFunctionCenter.swift
+++ b/iOSClient/Main/NCFunctionCenter.swift
@@ -178,14 +178,19 @@ import Photos
func openShare(viewController: UIViewController, metadata: tableMetadata, indexPage: NCGlobal.NCSharePagingIndex) {
- let shareNavigationController = UIStoryboard(name: "NCShare", bundle: nil).instantiateInitialViewController() as! UINavigationController
- let shareViewController = shareNavigationController.topViewController as! NCSharePaging
+ let serverUrlFileName = metadata.serverUrl + "/" + metadata.fileName
+ NCNetworking.shared.readFile(serverUrlFileName: serverUrlFileName, queue: .main) { account, metadata, errorCode, errorDescription in
+ if let metadata = metadata, errorCode == 0 {
+ let shareNavigationController = UIStoryboard(name: "NCShare", bundle: nil).instantiateInitialViewController() as! UINavigationController
+ let shareViewController = shareNavigationController.topViewController as! NCSharePaging
- shareViewController.metadata = metadata
- shareViewController.indexPage = indexPage
+ shareViewController.metadata = metadata
+ shareViewController.indexPage = indexPage
- shareNavigationController.modalPresentationStyle = .formSheet
- viewController.present(shareNavigationController, animated: true, completion: nil)
+ shareNavigationController.modalPresentationStyle = .formSheet
+ viewController.present(shareNavigationController, animated: true, completion: nil)
+ }
+ }
}
// MARK: -