fix crash when updating an existing entry
code clean up
This commit is contained in:
@@ -52,12 +52,11 @@ class HomeViewViewModel: ObservableObject {
|
||||
}
|
||||
|
||||
private func getGroupedData(addMonthStartWeekdayPadding: Bool) {
|
||||
grouped = PersistenceController.shared.splitIntoYearMonth()
|
||||
|
||||
var newStuff = PersistenceController.shared.splitIntoYearMonth()
|
||||
if addMonthStartWeekdayPadding {
|
||||
grouped = MoodEntryFunctions.padMoodEntriesForCalendar(entries: grouped)
|
||||
newStuff = MoodEntryFunctions.padMoodEntriesForCalendar(entries: grouped)
|
||||
}
|
||||
//
|
||||
grouped = newStuff
|
||||
numberOfItems = numberOfEntries
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user