Fix Month view showing fake data and show all 5 moods in exports
- Fix critical bug in generateObjectNotInArray() that ignored the mood parameter and generated random moods instead of placeholders, causing Month view to display fake colored entries for days without real data - Update Month and Year shareableView exports to show all 5 mood types even when some have 0 entries (previously filtered out empty moods) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,14 +48,9 @@ extension DataController {
|
||||
|
||||
/// Creates an entry that is NOT inserted into the context - used for UI placeholders
|
||||
func generateObjectNotInArray(forDate date: Date = Date(), withMood mood: Mood = .placeholder) -> MoodEntryModel {
|
||||
var moodValue = Int.random(in: 2...4)
|
||||
if Int.random(in: 0...400) % 5 == 0 {
|
||||
moodValue = Int.random(in: 0...4)
|
||||
}
|
||||
|
||||
let entry = MoodEntryModel(
|
||||
forDate: date,
|
||||
moodValue: moodValue,
|
||||
moodValue: mood.rawValue,
|
||||
entryType: EntryType.listView.rawValue,
|
||||
canEdit: false,
|
||||
canDelete: false
|
||||
|
||||
Reference in New Issue
Block a user