Signed-off-by: marinofaggiana <ios@nextcloud.com>
@@ -201,6 +201,7 @@ class NCDataSource: NSObject {
// MARK: -
+ @discardableResult
func appendMetadatasToSection(_ metadatas: [tableMetadata], metadataForSection: NCMetadataForSection, lastSearchResult: NCCSearchResult) -> [IndexPath] {
guard let sectionIndex = getSectionIndex(metadataForSection.sectionValue) else { return [] }
@@ -1845,7 +1845,7 @@ extension NCCollectionViewCommon: UICollectionViewDelegateFlowLayout {
}
- if isSearching || collectionView.collectionViewLayout == gridLayout || dataSource.numberOfSections() > 1 {
+ if isSearching || layoutForView?.layout == NCGlobal.shared.layoutGrid || dataSource.numberOfSections() > 1 {
if section == 0 {
return (getHeaderHeight(), headerRichWorkspace, NCGlobal.shared.heightSection)
} else {