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:
@@ -45,7 +45,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate: UNUserNotificationCenterDelegate {
|
||||
extension AppDelegate: @preconcurrency UNUserNotificationCenterDelegate {
|
||||
func requestAuthorization() { }
|
||||
|
||||
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
|
||||
@@ -68,7 +68,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
|
||||
case .great:
|
||||
DataController.shared.add(mood: .great, forDate: date, entryType: .notification)
|
||||
}
|
||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||
UNUserNotificationCenter.current().setBadgeCount(0)
|
||||
}
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
completionHandler()
|
||||
|
||||
Reference in New Issue
Block a user