|
@@ -67,6 +67,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
|
|
|
private var tipView: EasyTipView?
|
|
|
|
|
|
+ private var sharing: Bool = true
|
|
|
+ private var serverVersion: Int = 0
|
|
|
+
|
|
|
// DECLARE
|
|
|
internal var layoutKey = ""
|
|
|
internal var titleCurrentFolder = ""
|
|
@@ -165,6 +168,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
|
|
|
appDelegate.activeViewController = self
|
|
|
|
|
|
+ sharing = NCManageDatabase.shared.getCapabilitiesServerBool(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesFileSharingApiEnabled, exists: false)
|
|
|
+ serverVersion = NCManageDatabase.shared.getCapabilitiesServerInt(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)
|
|
|
+
|
|
|
layoutForView = NCManageDatabase.shared.getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3)
|
|
|
if layoutForView?.layout == NCGlobal.shared.layoutList {
|
|
@@ -1658,7 +1664,8 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
|
|
|
|
|
|
// ** IMPORT MUST BE AT THE END **
|
|
|
//
|
|
|
- if !metadata.isSharable {
|
|
|
+
|
|
|
+ if !metadata.isSharable(sharing: sharing, serverVersion: serverVersion) {
|
|
|
cell.hideButtonShare(true)
|
|
|
}
|
|
|
|