Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion kDrive/UI/Controller/Files/SidebarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,6 @@ class SidebarViewController: CustomLargeTitleCollectionViewController, SelectSwi
selectMode: selectMode
)

headerViewHeight = homeLargeTitleHeaderView.frame.height
return homeLargeTitleHeaderView

case RootMenuHeaderView.kind.rawValue:
Expand Down
1 change: 0 additions & 1 deletion kDrive/UI/Controller/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ extension HomeViewController {
homeLargeTitleHeaderView.isEnabled = false
homeLargeTitleHeaderView.text = recentActivitiesController?.title ?? ""
}
headerViewHeight = homeLargeTitleHeaderView.frame.height
return homeLargeTitleHeaderView
Comment thread
BaptGrv marked this conversation as resolved.
Resolved
case .upload:
return UICollectionReusableView()
Expand Down
11 changes: 11 additions & 0 deletions kDrive/Utils/CustomLargeTitleCollectionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,20 @@ class CustomLargeTitleCollectionViewController: UICollectionViewController {

// Refresh once the transition has settled, since updates are skipped during it.
lastAppliedTitleAlpha = nil
#if !ISEXTENSION
if !MainTabViewController.isHingeClosed {
refreshHeaderViewHeight()
}
#endif
updateNavigationBarAppearance()
}

private func refreshHeaderViewHeight() {
guard let height = collectionView.visibleSupplementaryViews(ofKind: UICollectionView.elementKindSectionHeader)
.compactMap({ $0 as? HomeLargeTitleHeaderView }).first?.frame.height else { return }
headerViewHeight = height
}

override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)

Expand Down
Loading