Skip to content

Commit fd7e84a

Browse files
committed
ui: 푸시 알림을 선택하기 전 뷰의 배경색 수정
1 parent 738d7e7 commit fd7e84a

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

Application/DevLogPresentation/Sources/Main/MainView.swift

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,8 @@ struct MainView: View {
135135
)
136136
.navigationSplitViewColumnWidth(min: 350, ideal: 450, max: nil)
137137
} detail: {
138-
Group {
139-
if let todoId = pushNotificationListViewCoordinator.todoIdToPresent?.id {
140-
TodoDetailView(
141-
viewModel: pushNotificationListViewCoordinator.makeTodoDetailViewModel(
142-
todoId: todoId
143-
)
144-
)
145-
.id(todoId)
146-
} else {
147-
ContentUnavailableView(
148-
String(localized: "push_notifications_select_detail"),
149-
systemImage: "bell.badge"
150-
)
151-
}
152-
}
138+
notificationRegularDetailView
153139
}
154-
.background(Color(.systemGroupedBackground).ignoresSafeArea())
155140
case .profile:
156141
NavigationSplitView {
157142
mainSidebar
@@ -322,6 +307,24 @@ struct MainView: View {
322307
)
323308
}
324309

310+
@ViewBuilder
311+
private var notificationRegularDetailView: some View {
312+
if let todoId = pushNotificationListViewCoordinator.todoIdToPresent?.id {
313+
TodoDetailView(
314+
viewModel: pushNotificationListViewCoordinator.makeTodoDetailViewModel(
315+
todoId: todoId
316+
)
317+
)
318+
.id(todoId)
319+
} else {
320+
ContentUnavailableView(
321+
String(localized: "push_notifications_select_detail"),
322+
systemImage: "bell.badge"
323+
)
324+
.background(Color(.systemGroupedBackground).ignoresSafeArea())
325+
}
326+
}
327+
325328
private var profileView: some View {
326329
ProfileView(
327330
coordinator: profileViewCoordinator,

0 commit comments

Comments
 (0)