Add interactive widget voting and fix warnings/bugs
Widget Features: - Add inline voting to timeline widget when no entry exists for today - Show random prompt from notification strings in voting mode - Update vote widget to use simple icon style for selection - Make stats bar full width in voted state view - Add Localizable.strings to widget extension target Bug Fixes: - Fix inverted date calculation in InsightsViewModel streak logic - Replace force unwraps with safe optional handling in widgets - Replace fatalError calls with graceful error handling - Fix CSV import safety in SettingsView Warning Fixes: - Add @retroactive to Color and Date extension conformances - Update deprecated onChange(of:perform:) to new syntax - Replace deprecated applicationIconBadgeNumber with setBadgeCount - Replace deprecated UIApplication.shared.windows API - Add @preconcurrency for Swift 6 protocol conformances - Add missing widget family cases to switch statement - Remove unused variables and #warning directives 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -343,7 +343,7 @@ struct TintPickerCompact: View {
|
||||
ForEach(0..<5, id: \.self) { index in
|
||||
ColorPicker("", selection: colorBinding(for: index))
|
||||
.labelsHidden()
|
||||
.onChange(of: colorBinding(for: index).wrappedValue) { _ in
|
||||
.onChange(of: colorBinding(for: index).wrappedValue) {
|
||||
saveCustomMoodTint()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,39 +60,39 @@ struct TintPickerView: View {
|
||||
|
||||
HStack {
|
||||
ColorPicker("", selection: $customMoodTint.colorOne)
|
||||
.onChange(of: customMoodTint.colorOne, perform: { _ in
|
||||
.onChange(of: customMoodTint.colorOne) {
|
||||
saveCustomMoodTint()
|
||||
})
|
||||
}
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
|
||||
ColorPicker("", selection: $customMoodTint.colorTwo)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.onChange(of: customMoodTint.colorTwo, perform: { _ in
|
||||
.onChange(of: customMoodTint.colorTwo) {
|
||||
saveCustomMoodTint()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
ColorPicker("", selection: $customMoodTint.colorThree)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.onChange(of: customMoodTint.colorThree, perform: { _ in
|
||||
.onChange(of: customMoodTint.colorThree) {
|
||||
saveCustomMoodTint()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
ColorPicker("", selection: $customMoodTint.colorFour)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.onChange(of: customMoodTint.colorFour, perform: { _ in
|
||||
.onChange(of: customMoodTint.colorFour) {
|
||||
saveCustomMoodTint()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
ColorPicker("", selection: $customMoodTint.colorFive)
|
||||
.labelsHidden()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.onChange(of: customMoodTint.colorFive, perform: { _ in
|
||||
.onChange(of: customMoodTint.colorFive) {
|
||||
saveCustomMoodTint()
|
||||
})
|
||||
}
|
||||
}
|
||||
.background(
|
||||
Color.clear
|
||||
|
||||
Reference in New Issue
Block a user