Skip to content

Commit f756c23

Browse files
committed
refactor: PushNotificationListView의 헤더 높이 적용 형태를 TodoListView와 동일하도록 개선
1 parent e0ec648 commit f756c23

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

DevLog/UI/PushNotification/PushNotificationListView.swift

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@ struct PushNotificationListView: View {
2727
}
2828
.safeAreaInset(edge: .top) { safeAreaHeader }
2929
.background(Color(.secondarySystemBackground))
30-
.onAppear {
31-
viewModel.send(.fetchNotifications)
32-
headerOffset = 0
33-
isScrollTrackingEnabled = false
34-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
35-
isScrollTrackingEnabled = true
36-
}
37-
}
30+
.onAppear { viewModel.send(.fetchNotifications) }
3831
.refreshable { viewModel.send(.fetchNotifications) }
3932
.navigationTitle(String(localized: "nav_push_notifications"))
4033
.alert(
@@ -135,7 +128,6 @@ struct PushNotificationListView: View {
135128
private var safeAreaHeader: some View {
136129
VStack(spacing: 4) {
137130
headerView
138-
.clipped()
139131
if #unavailable(iOS 26) {
140132
Divider()
141133
.padding(.horizontal, -16)
@@ -164,6 +156,14 @@ struct PushNotificationListView: View {
164156
.frame(maxWidth: .infinity, alignment: .leading)
165157
}
166158
}
159+
.frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20)
160+
.onAppear {
161+
headerOffset = 0
162+
isScrollTrackingEnabled = false
163+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
164+
isScrollTrackingEnabled = true
165+
}
166+
}
167167
}
168168

169169
private var headerContent: some View {
@@ -234,7 +234,6 @@ struct PushNotificationListView: View {
234234
.adaptiveButtonStyle(color: condition ? .blue : .clear)
235235
}
236236
}
237-
.frame(height: 36)
238237
}
239238

240239
private var filterBadge: some View {

0 commit comments

Comments
 (0)