|
@@ -165,7 +165,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
|
|
|
appDelegate.activeViewController = self
|
|
|
|
|
|
- layoutForView = NCDBLayoutForView().getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
+ layoutForView = NCManageDatabase.shared.getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3)
|
|
|
if layoutForView?.layout == NCGlobal.shared.layoutList {
|
|
|
collectionView?.collectionViewLayout = listLayout
|
|
@@ -312,7 +312,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
self.navigationController?.popToRootViewController(animated: false)
|
|
|
}
|
|
|
|
|
|
- layoutForView = NCDBLayoutForView().getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
+ layoutForView = NCManageDatabase.shared.getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
gridLayout.itemForLine = CGFloat(layoutForView?.itemForLine ?? 3)
|
|
|
if layoutForView?.layout == NCGlobal.shared.layoutList {
|
|
|
collectionView?.collectionViewLayout = listLayout
|
|
@@ -825,7 +825,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
// list layout
|
|
|
headerMenu?.buttonSwitch.accessibilityLabel = NSLocalizedString("_grid_view_", comment: "")
|
|
|
layoutForView?.layout = NCGlobal.shared.layoutList
|
|
|
- NCDBLayoutForView().setLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
+ NCManageDatabase.shared.setLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
self.groupByField = "name"
|
|
|
if self.dataSource.groupByField != self.groupByField {
|
|
|
self.dataSource.changeGroupByField(self.groupByField)
|
|
@@ -840,7 +840,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
// grid layout
|
|
|
headerMenu?.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
|
|
|
layoutForView?.layout = NCGlobal.shared.layoutGrid
|
|
|
- NCDBLayoutForView().setLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
+ NCManageDatabase.shared.setLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
|
|
|
if isSearchingMode {
|
|
|
self.groupByField = "name"
|
|
|
} else {
|
|
@@ -1007,7 +1007,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
|
|
|
autoUploadDirectory = NCManageDatabase.shared.getAccountAutoUploadDirectory(urlBase: appDelegate.urlBase, userId: appDelegate.userId, account: appDelegate.account)
|
|
|
|
|
|
// get layout for view
|
|
|
- layoutForView = NCDBLayoutForView().getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
+ layoutForView = NCManageDatabase.shared.getLayoutForView(account: appDelegate.account, key: layoutKey, serverUrl: serverUrl)
|
|
|
|
|
|
// set GroupField for Grid
|
|
|
if !isSearchingMode && layoutForView?.layout == NCGlobal.shared.layoutGrid {
|