fix month view being nil
This commit is contained in:
@@ -54,14 +54,12 @@ class HomeViewViewModel: ObservableObject {
|
||||
private func getGroupedData(addMonthStartWeekdayPadding: Bool) {
|
||||
var newStuff = PersistenceController.shared.splitIntoYearMonth()
|
||||
if addMonthStartWeekdayPadding {
|
||||
newStuff = MoodEntryFunctions.padMoodEntriesForCalendar(entries: grouped)
|
||||
newStuff = MoodEntryFunctions.padMoodEntriesForCalendar(entries: newStuff)
|
||||
}
|
||||
grouped = newStuff
|
||||
numberOfItems = numberOfEntries
|
||||
}
|
||||
|
||||
|
||||
|
||||
public func updateData() {
|
||||
getGroupedData(addMonthStartWeekdayPadding: self.addMonthStartWeekdayPadding)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user