Skip to content

Commit

Permalink
fix(FileListViewController): Bottom padding in public share mode (#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann authored Jan 24, 2025
2 parents f4e459c + 79ba7bc commit 35d1b1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ class FileListViewController: UICollectionViewController, SwipeActionCollectionV

// MARK: - Properties

private var paddingBottom: CGFloat {
guard !driveFileManager.isPublicShare else {
return UIConstants.List.publicSharePaddingBottom
}
return UIConstants.List.paddingBottom
}

var collectionViewFlowLayout: UICollectionViewFlowLayout? {
collectionViewLayout as? UICollectionViewFlowLayout
}
Expand Down Expand Up @@ -131,7 +138,7 @@ class FileListViewController: UICollectionViewController, SwipeActionCollectionV
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
withReuseIdentifier: headerViewIdentifier
)
collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: UIConstants.List.paddingBottom, right: 0)
collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: paddingBottom, right: 0)
collectionView.backgroundColor = KDriveResourcesAsset.backgroundColor.color
(collectionView as? SwipableCollectionView)?.swipeDataSource = self
(collectionView as? SwipableCollectionView)?.swipeDelegate = self
Expand Down
1 change: 1 addition & 0 deletions kDriveCore/UI/UIConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public enum UIConstants {

public enum List {
public static let paddingBottom = 50.0
public static let publicSharePaddingBottom = 90.0
public static let floatingButtonPaddingBottom = 75.0
}

Expand Down

0 comments on commit 35d1b1d

Please sign in to comment.