From f756c23499bf6ead15e38f5035a3fdf253ea4ac6 Mon Sep 17 00:00:00 2001 From: opficdev Date: Mon, 6 Apr 2026 23:54:27 +0900 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20PushNotificationListView?= =?UTF-8?q?=EC=9D=98=20=ED=97=A4=EB=8D=94=20=EB=86=92=EC=9D=B4=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20=ED=98=95=ED=83=9C=EB=A5=BC=20TodoListView=EC=99=80?= =?UTF-8?q?=20=EB=8F=99=EC=9D=BC=ED=95=98=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PushNotificationListView.swift | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/DevLog/UI/PushNotification/PushNotificationListView.swift b/DevLog/UI/PushNotification/PushNotificationListView.swift index b75bf445..54dae46d 100644 --- a/DevLog/UI/PushNotification/PushNotificationListView.swift +++ b/DevLog/UI/PushNotification/PushNotificationListView.swift @@ -27,14 +27,7 @@ struct PushNotificationListView: View { } .safeAreaInset(edge: .top) { safeAreaHeader } .background(Color(.secondarySystemBackground)) - .onAppear { - viewModel.send(.fetchNotifications) - headerOffset = 0 - isScrollTrackingEnabled = false - DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { - isScrollTrackingEnabled = true - } - } + .onAppear { viewModel.send(.fetchNotifications) } .refreshable { viewModel.send(.fetchNotifications) } .navigationTitle(String(localized: "nav_push_notifications")) .alert( @@ -135,7 +128,6 @@ struct PushNotificationListView: View { private var safeAreaHeader: some View { VStack(spacing: 4) { headerView - .clipped() if #unavailable(iOS 26) { Divider() .padding(.horizontal, -16) @@ -164,6 +156,14 @@ struct PushNotificationListView: View { .frame(maxWidth: .infinity, alignment: .leading) } } + .frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20) + .onAppear { + headerOffset = 0 + isScrollTrackingEnabled = false + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + isScrollTrackingEnabled = true + } + } } private var headerContent: some View { @@ -234,7 +234,6 @@ struct PushNotificationListView: View { .adaptiveButtonStyle(color: condition ? .blue : .clear) } } - .frame(height: 36) } private var filterBadge: some View { From b9c8066c5801c1eb82cc7d869aa962619de2980a Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 7 Apr 2026 00:49:07 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20DispatchQueue.main.async=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=B4=20=ED=95=84=EC=9A=94=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PushNotification/PushNotificationListView.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/DevLog/UI/PushNotification/PushNotificationListView.swift b/DevLog/UI/PushNotification/PushNotificationListView.swift index 54dae46d..3f5a33eb 100644 --- a/DevLog/UI/PushNotification/PushNotificationListView.swift +++ b/DevLog/UI/PushNotification/PushNotificationListView.swift @@ -191,7 +191,9 @@ struct PushNotificationListView: View { } Button { - viewModel.send(.toggleSortOption) + DispatchQueue.main.async { + viewModel.send(.toggleSortOption) + } } label: { let condition = viewModel.state.query.sortOrder == .oldest Text( @@ -200,8 +202,8 @@ struct PushNotificationListView: View { viewModel.state.query.sortOrder.title ) ) - .foregroundStyle(condition ? .white : Color(.label)) - .adaptiveButtonStyle(color: condition ? .blue : .clear) + .foregroundStyle(condition ? .white : Color(.label)) + .adaptiveButtonStyle(color: condition ? .blue : .clear) } Menu { @@ -226,7 +228,9 @@ struct PushNotificationListView: View { } Button { - viewModel.send(.toggleUnreadOnly) + DispatchQueue.main.async { + viewModel.send(.toggleUnreadOnly) + } } label: { let condition = viewModel.state.query.unreadOnly Text(String(localized: "push_unread")) From 0e9738a5ea69e1a3d5a891b4d589683bd8735678 Mon Sep 17 00:00:00 2001 From: opficdev Date: Tue, 7 Apr 2026 00:56:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20UIFont=EB=A5=BC=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=B4=20=EC=A7=81=EC=A0=91=20=EA=B3=84=EC=82=B0?= =?UTF-8?q?=ED=95=98=EA=B8=B0=EB=B3=B4=EB=8B=A4=20'@ScaledMetric'=EC=9D=84?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=ED=95=B4=EC=96=B4=20=EC=84=A0=EC=96=B8?= =?UTF-8?q?=EC=A0=81=20=ED=98=95=ED=83=9C=EB=A1=9C=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DevLog/UI/Home/TodoListView.swift | 3 ++- DevLog/UI/PushNotification/PushNotificationListView.swift | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DevLog/UI/Home/TodoListView.swift b/DevLog/UI/Home/TodoListView.swift index 566eef3e..0b194299 100644 --- a/DevLog/UI/Home/TodoListView.swift +++ b/DevLog/UI/Home/TodoListView.swift @@ -12,6 +12,7 @@ struct TodoListView: View { @Environment(NavigationRouter.self) var router @Environment(\.diContainer) var container: DIContainer @Environment(\.colorScheme) private var colorScheme + @ScaledMetric(relativeTo: .body) private var headerHeight = 41 @State private var headerOffset: CGFloat = .zero @State private var isScrollTrackingEnabled = false @@ -322,7 +323,7 @@ struct TodoListView: View { .scrollIndicators(.never) .scrollDisabled(!isScrollTrackingEnabled) .contentMargins(.leading, 16, for: .scrollContent) - .frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20) + .frame(height: headerHeight) .onAppear { headerOffset = 0 isScrollTrackingEnabled = false diff --git a/DevLog/UI/PushNotification/PushNotificationListView.swift b/DevLog/UI/PushNotification/PushNotificationListView.swift index 3f5a33eb..f266e18f 100644 --- a/DevLog/UI/PushNotification/PushNotificationListView.swift +++ b/DevLog/UI/PushNotification/PushNotificationListView.swift @@ -13,6 +13,7 @@ struct PushNotificationListView: View { @Environment(\.sceneWidth) private var sceneWidth @Environment(\.colorScheme) private var colorScheme @Environment(\.diContainer) private var container: DIContainer + @ScaledMetric(relativeTo: .body) private var headerHeight = 41 @State private var headerOffset: CGFloat = 0 @State private var isScrollTrackingEnabled = false @@ -156,7 +157,7 @@ struct PushNotificationListView: View { .frame(maxWidth: .infinity, alignment: .leading) } } - .frame(height: UIFont.preferredFont(forTextStyle: .body).lineHeight.rounded(.up) + 20) + .frame(height: headerHeight) .onAppear { headerOffset = 0 isScrollTrackingEnabled = false