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

@@ -14,6 +14,7 @@ struct MonthView: View {
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
// store a value that gets changed when user updates custom colors to update the view since the moodTint doesn't change
@AppStorage(UserDefaultsStore.Keys.customMoodTintUpdateNumber.rawValue, store: GroupUserDefaults.groupDefaults) private var customMoodTintUpdateNumber: Int = 0
@ObservedObject var viewModel = HomeViewViewModel(addMonthStartWeekdayPadding: true)
@@ -111,11 +112,7 @@ extension MonthView {
.foregroundColor(Color(UIColor.darkGray))
.font(.system(size: 20))
}).sheet(isPresented: $showingSheet) {
SettingsView(editedDataClosure: {
withAnimation{
viewModel.updateData()
}
})
SettingsView()
}
.padding(.top, 60)
.padding(.trailing)