Update Neon colors and show color circles in theme picker
- Update NeonMoodTint to use synthwave colors matching Neon voting style (cyan, lime, yellow, orange, magenta) - Replace text label with 5 color circles in theme preview Colors row - Remove unused textColor customization code and picker views - Add .id(moodTint) to Month/Year views for color refresh - Clean up various unused color-related code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -67,4 +67,21 @@ final class DataController: ObservableObject {
|
||||
Self.logger.error("Failed to save context: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
||||
/// Refresh data from disk to pick up changes made by extensions (widget/watch).
|
||||
/// Call this when app becomes active.
|
||||
func refreshFromDisk() {
|
||||
// SwiftData doesn't have a direct "refresh from disk" API.
|
||||
// We achieve this by:
|
||||
// 1. Rolling back any unsaved changes (ensures clean state)
|
||||
// 2. Triggering listeners to re-fetch data (which will read from disk)
|
||||
modelContext.rollback()
|
||||
|
||||
// Notify listeners to re-fetch their data
|
||||
for closure in editedDataClosure {
|
||||
closure()
|
||||
}
|
||||
|
||||
Self.logger.debug("Refreshed data from disk")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user