Skip to content

Commit

Permalink
Change: update top margin of dashboard sections
Browse files Browse the repository at this point in the history
  • Loading branch information
hassaanelgarem committed Apr 6, 2022
1 parent 31102e0 commit af28970
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ extension BlogDashboardViewController {
let section = NSCollectionLayoutSection(group: group)
let isQuickActionSection = viewModel.card(for: sectionIndex) == .quickActions
let isLastSection = collectionView.numberOfSections == (sectionIndex + 1)
let horizontalInset = isQuickActionSection ? 0 : Constants.sectionInset
let bottomInset = isLastSection ? Constants.sectionInset : 0
section.contentInsets = NSDirectionalEdgeInsets(top: Constants.sectionInset,
let horizontalInset = isQuickActionSection ? 0 : Constants.horizontalSectionInset
let bottomInset = isLastSection ? Constants.verticalSectionInset : 0
section.contentInsets = NSDirectionalEdgeInsets(top: Constants.verticalSectionInset,
leading: horizontalInset,
bottom: bottomInset,
trailing: horizontalInset)
Expand Down Expand Up @@ -239,7 +239,8 @@ extension BlogDashboardViewController {
private enum Constants {
static let estimatedWidth: CGFloat = 100
static let estimatedHeight: CGFloat = 44
static let sectionInset: CGFloat = 20
static let cellSpacing: CGFloat = 20
static let horizontalSectionInset: CGFloat = 20
static let verticalSectionInset: CGFloat = 24
static let cellSpacing: CGFloat = 24
}
}

0 comments on commit af28970

Please sign in to comment.