update top header graph view when custom color changes

code cleanup
This commit is contained in:
Trey t
2022-03-02 17:25:06 -06:00
parent 39a974bdf4
commit 746337b6a2
15 changed files with 82 additions and 69 deletions

View File

@@ -10,9 +10,7 @@ import CloudKitSyncMonitor
struct SettingsView: View {
@Environment(\.dismiss) var dismiss
let editedDataClosure: (() -> Void)
@State private var showOnboarding = false
@State private var showSpecialThanks = false
@@ -104,7 +102,6 @@ struct SettingsView: View {
theme.currentTheme.secondaryBGColor
Button(action: {
PersistenceController.shared.populateTestData()
editedDataClosure()
}, label: {
Text("Add test data")
.foregroundColor(theme.currentTheme.labelColor)
@@ -120,7 +117,6 @@ struct SettingsView: View {
theme.currentTheme.secondaryBGColor
Button(action: {
PersistenceController.shared.clearDB()
editedDataClosure()
}, label: {
Text("Clear DB")
.foregroundColor(theme.currentTheme.labelColor)
@@ -224,13 +220,9 @@ struct SettingsView: View {
struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
SettingsView(editedDataClosure: {
})
SettingsView()
SettingsView(editedDataClosure: {
})
SettingsView()
.preferredColorScheme(.dark)
}
}