diff --git a/LeCountdown/LeCountdownApp.swift b/LeCountdown/LeCountdownApp.swift index cd4d836..78ebdbf 100644 --- a/LeCountdown/LeCountdownApp.swift +++ b/LeCountdown/LeCountdownApp.swift @@ -36,7 +36,6 @@ struct LeCountdownApp: App { WindowGroup { NavigationStack { - TabView(selection: $tabSelection) { PresetsView(tabSelection: $tabSelection) .environment(\.managedObjectContext, persistenceController.container.viewContext) @@ -50,10 +49,8 @@ struct LeCountdownApp: App { RecordsView().environment(\.managedObjectContext, persistenceController.container.viewContext) .tabItem { Label("Stats", systemImage: "chart.bar.fill") } .tag(2) - - }.tabViewStyle(.page) - .foregroundColor(Color.accentColor) - } + } + }.tabViewStyle(.page) .onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in self._willEnterForegroundNotification() } diff --git a/LeCountdown/Views/ContentView.swift b/LeCountdown/Views/ContentView.swift index 62d4712..345c388 100644 --- a/LeCountdown/Views/ContentView.swift +++ b/LeCountdown/Views/ContentView.swift @@ -86,7 +86,6 @@ struct ContentView: View { var body: some View { - NavigationStack { GeometryReader { reader in let width: CGFloat = reader.size.width / 2 - 15.0 @@ -136,18 +135,6 @@ struct ContentView: View { self._reorderSpots(from: from, to: to) } } - - -// ReorderableForEach(items: timersArray) { timer in -// -// DialView(timer: timer, isEditingBinding: self.$isEditing, frameSize: width) -// .environment(\.managedObjectContext, viewContext) -// .environmentObject(Conductor.maestro) -// .environmentObject(boringContext) -// -// } moveAction: { from, to in -// self._reorder(from: from, to: to) -// } } }.padding(.horizontal, itemSpacing) @@ -161,7 +148,7 @@ struct ContentView: View { } } } -// .navigationTitle("Yeah!") + .navigationTitle("Home") .alert(boringContext.error?.localizedDescription ?? "missing error", isPresented: $boringContext.showDefaultAlert) { Button("OK", role: .cancel) { } } @@ -199,7 +186,6 @@ struct ContentView: View { .onOpenURL { url in self._performActionIfPossible(url: url) } - } } diff --git a/LeCountdown/Views/PresetsView.swift b/LeCountdown/Views/PresetsView.swift index 1f65da7..279e722 100644 --- a/LeCountdown/Views/PresetsView.swift +++ b/LeCountdown/Views/PresetsView.swift @@ -82,29 +82,27 @@ struct PresetsView: View { var body: some View { - NavigationStack { - List { - ForEach(PresetSection.allCases) { section in - Section(header: Text(section.localizedName)) { - ForEach(section.presets) { preset in - - Button { - self.model.selectedPreset = preset - self.isPresented = true - } label: { - Text(preset.localizedName) - } - + List { + ForEach(PresetSection.allCases) { section in + Section(header: Text(section.localizedName)) { + ForEach(section.presets) { preset in + + Button { + self.model.selectedPreset = preset + self.isPresented = true + } label: { + Text(preset.localizedName) } + } } } - .sheet(isPresented: $isPresented, content: { - CountdownEditView(isPresented: $isPresented, preset: self.model.selectedPreset, tabSelection: self.tabSelection) - .environment(\.managedObjectContext, viewContext) - }) - .navigationTitle("Presets") } + .sheet(isPresented: $isPresented, content: { + CountdownEditView(isPresented: $isPresented, preset: self.model.selectedPreset, tabSelection: self.tabSelection) + .environment(\.managedObjectContext, viewContext) + }) + .navigationTitle("Presets") } } diff --git a/LeCountdown/Views/RecordsView.swift b/LeCountdown/Views/RecordsView.swift index 655fb6b..4ddaa30 100644 --- a/LeCountdown/Views/RecordsView.swift +++ b/LeCountdown/Views/RecordsView.swift @@ -21,7 +21,7 @@ struct RecordsView: View { var body: some View { - Group { + VStack { if records.isEmpty { Text("You don't have any recorded activity yet") } else {