|
@@ -58,7 +58,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
|
|
|
|
|
|
private var emptyDataSet: NCEmptyDataSet?
|
|
|
|
|
|
- private let keyLayout = NCGlobal.shared.layoutViewMove
|
|
|
+ private let layoutKey = NCGlobal.shared.layoutViewMove
|
|
|
private var serverUrlPush = ""
|
|
|
private var metadataFolder = tableMetadata()
|
|
|
|
|
@@ -177,7 +177,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
|
|
|
autoUploadFileName = NCManageDatabase.shared.getAccountAutoUploadFileName()
|
|
|
autoUploadDirectory = NCManageDatabase.shared.getAccountAutoUploadDirectory(urlBase: activeAccount.urlBase, account: activeAccount.account)
|
|
|
|
|
|
- layoutForView = NCUtility.shared.getLayoutForView(key: keyLayout, serverUrl: serverUrl)
|
|
|
+ layoutForView = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
|
|
|
gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3)
|
|
|
|
|
|
if layoutForView?.layout == NCGlobal.shared.layoutList {
|
|
@@ -285,6 +285,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
|
|
|
})
|
|
|
})
|
|
|
layoutForView?.layout = NCGlobal.shared.layoutList
|
|
|
+ NCUtility.shared.setLayoutForView(key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
} else {
|
|
|
// grid layout
|
|
|
headerMenu?.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
|
|
@@ -295,6 +296,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
|
|
|
})
|
|
|
})
|
|
|
layoutForView?.layout = NCGlobal.shared.layoutGrid
|
|
|
+ NCUtility.shared.setLayoutForView(key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
}
|
|
|
reloadDataSource()
|
|
|
}
|
|
@@ -302,7 +304,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, UIAdaptivePresent
|
|
|
func tapButtonOrder(_ sender: Any) {
|
|
|
|
|
|
let sortMenu = NCSortMenu()
|
|
|
- sortMenu.toggleMenu(viewController: self, key: keyLayout, sortButton: sender as? UIButton, serverUrl: serverUrl)
|
|
|
+ sortMenu.toggleMenu(viewController: self, key: layoutKey, sortButton: sender as? UIButton, serverUrl: serverUrl)
|
|
|
}
|
|
|
|
|
|
// MARK: - Push metadata
|
|
@@ -726,7 +728,7 @@ extension NCSelect {
|
|
|
var predicate: NSPredicate?
|
|
|
var groupByField = "name"
|
|
|
|
|
|
- layoutForView = NCUtility.shared.getLayoutForView(key: keyLayout, serverUrl: serverUrl)
|
|
|
+ layoutForView = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
|
|
|
|
|
|
// set GroupField for Grid
|
|
|
if layoutForView?.layout == NCGlobal.shared.layoutGrid {
|