Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

chore: update constraints on header view #1805

Merged
merged 2 commits into from
Oct 4, 2023
Merged
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
7 changes: 5 additions & 2 deletions Source/CourseDashboardHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,18 @@ class CourseDashboardHeaderView: UIView {
}

if bannerInfo != nil {
datesBannerView.removeFromSuperview()
containerView.addSubview(datesBannerView)
if !containerView.subviews.contains(datesBannerView) {
containerView.addSubview(datesBannerView)
}

datesBannerView.snp.remakeConstraints { make in
make.top.equalTo(bottomContainer.snp.bottom).offset(StandardVerticalMargin)
make.leading.equalTo(containerView)
make.trailing.equalTo(containerView)
}
bottomContainer = datesBannerView
} else {
datesBannerView.removeFromSuperview()
mumer92 marked this conversation as resolved.
Show resolved Hide resolved
}

tabbarView.snp.remakeConstraints { make in
Expand Down
2 changes: 1 addition & 1 deletion Source/NewCourseDashboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class NewCourseDashboardViewController: UIViewController, InterfaceOrientationOv
make.top.equalTo(safeTop)
make.leading.equalTo(contentView)
make.trailing.equalTo(contentView)
make.height.lessThanOrEqualTo(StandardVerticalMargin * 100)
make.height.lessThanOrEqualTo(StandardVerticalMargin * 120)
}

container.snp.remakeConstraints { make in
Expand Down
Loading