File tree Expand file tree Collapse file tree
Application/DevLogPresentation/Sources/Main Expand file tree Collapse file tree Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments