Skip to content

Commit

Permalink
Fix iOS 15 crash on remote messaging (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunn authored Sep 26, 2023
1 parent dc15e7a commit 6b5b394
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions DuckDuckGo/HomeCollectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ class HomeCollectionView: UICollectionView {
renderers.install(renderer: FavoritesHomeViewSectionRenderer(viewModel: favoritesViewModel))

case .homeMessage:
if #available(iOS 16.0, *) {
renderers.install(renderer: HomeMessageViewSectionRenderer(homePageConfiguration: homePageConfiguration))
}
renderers.install(renderer: HomeMessageViewSectionRenderer(homePageConfiguration: homePageConfiguration))

case .appTrackingProtection:
#if APP_TRACKING_PROTECTION
Expand Down
10 changes: 6 additions & 4 deletions DuckDuckGo/HomeMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ struct HomeMessageView: View {
@State var activityItem: ShareItem?

var body: some View {
ZStack {
closeButtonHeader

ZStack(alignment: .topTrailing) {
VStack(spacing: 8) {
Group {
topText
Expand Down Expand Up @@ -78,6 +76,11 @@ struct HomeMessageView: View {
.multilineTextAlignment(.center)
.padding(.vertical)
.padding(.horizontal, 8)

closeButtonHeader
.alignmentGuide(.top) { dimension in
dimension[.top]
}
}
.background(RoundedRectangle(cornerRadius: Const.Radius.corner)
.fill(Color.background)
Expand All @@ -97,7 +100,6 @@ struct HomeMessageView: View {
closeButton
.padding(0)
}
Spacer()
}
}

Expand Down

0 comments on commit 6b5b394

Please sign in to comment.