Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,30 @@ public struct PushNotificationListView: View {
}

private var headerView: some View {
Group {
if #available(iOS 18.0, *) {
ScrollView(.horizontal) {
headerContent
}
.scrollIndicators(.never)
.contentMargins(.leading, 16, for: .scrollContent)
} else {
headerContent
.padding(.leading, 16)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
.frame(height: headerHeight)
.onAppear {
headerOffset = 0
isScrollTrackingEnabled = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
isScrollTrackingEnabled = true
}
}
}

private var headerContent: some View {
HStack(spacing: 8) {
if 0 < store.appliedFilterCount {
Menu {
Expand Down Expand Up @@ -231,16 +255,6 @@ public struct PushNotificationListView: View {
}
.frame(height: headerHeight)
}
.padding(.leading, 16)
.frame(maxWidth: .infinity, alignment: .leading)
.frame(height: headerHeight)
.onAppear {
headerOffset = 0
isScrollTrackingEnabled = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
isScrollTrackingEnabled = true
}
}
}

private var filterBadge: some View {
Expand Down
Loading