update top header graph view when custom color changes
code cleanup
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user