diff --git a/ownCloudAppShared/Client/Account/Controller/AccountController.swift b/ownCloudAppShared/Client/Account/Controller/AccountController.swift index 8d4f65f3e..a059c9a6d 100644 --- a/ownCloudAppShared/Client/Account/Controller/AccountController.swift +++ b/ownCloudAppShared/Client/Account/Controller/AccountController.swift @@ -37,6 +37,7 @@ public class AccountController: NSObject, OCDataItem, OCDataItemVersioning, Acco public var showQuickAccess: Bool public var showActivity: Bool public var autoSelectPersonalFolder: Bool + public var expandQuickAccess: Bool public var sectionAppearance: UICollectionLayoutListConfiguration.Appearance = .sidebar @@ -50,6 +51,7 @@ public class AccountController: NSObject, OCDataItem, OCDataItemVersioning, Acco config.showSavedSearches = true config.showQuickAccess = true config.showActivity = false + config.expandQuickAccess = true config.sectionAppearance = .insetGrouped @@ -64,6 +66,7 @@ public class AccountController: NSObject, OCDataItem, OCDataItemVersioning, Acco showSavedSearches = true showQuickAccess = true showActivity = true + expandQuickAccess = false autoSelectPersonalFolder = true } @@ -472,6 +475,11 @@ public class AccountController: NSObject, OCDataItem, OCDataItemVersioning, Acco if let quickAccessFolderDataSource = specialItemsDataSources[.quickAccessFolder] { sources.append(quickAccessFolderDataSource) } + + if configuration.expandQuickAccess, let accountControllerSection = accountControllerSection, + let expandedItemRefs = accountControllerSection.collectionViewController?.wrap(references: [ specialItemsDataReferences[.quickAccessFolder]! ], forSection: accountControllerSection.identifier) { + accountControllerSection.expandedItemRefs = expandedItemRefs + } } // Extra items (Activity & Co via class extension in the app)