Skip to content

Commit

Permalink
Merge pull request #2427 from CruGlobal/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
levieggertcru authored Jan 29, 2025
2 parents 1e947fe + 414fdd9 commit 87d8b2a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,17 @@ extension MobileContentStackView {

for childView in childViews {

let isSpacerView: Bool = childView is MobileContentSpacerView
let isAutoSpacer: Bool
let spacerView: MobileContentSpacerView? = childView as? MobileContentSpacerView

if !isSpacerView && childView.visibilityState != .gone {
if let spacerView = spacerView {
isAutoSpacer = spacerView.isAuto
}
else {
isAutoSpacer = false
}

if !isAutoSpacer && childView.visibilityState != .gone {

heightOfChildrenAndItemSpacing += childView.frame.size.height
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class MobileContentSpacerView: MobileContentView {
fatalError("init(coder:) has not been implemented")
}

var isAuto: Bool {
return viewModel.isAuto
}

var height: MobileContentSpacerHeight {
return viewModel.height
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ class MobileContentSpacerViewModel: MobileContentViewModel {

super.init(baseModel: spacerModel, renderedPageContext: renderedPageContext, mobileContentAnalytics: mobileContentAnalytics)
}

var isAuto: Bool {

switch spacerModel.mode {
case .auto_:
return true
default:
return false
}
}
}

0 comments on commit 87d8b2a

Please sign in to comment.