Fix production crash points, actor-isolation warnings, and rebrand URLs
Remove all fatalError/force unwrap/force cast crash points from production
paths (ShowBasedOnVoteLogics, Random, ReflectApp, NoteEditorView). Fix
actor-isolation warnings by wrapping off-main-thread AnalyticsManager calls
in Task { @MainActor in } (LocalNotification) and replacing DispatchQueue
with Task.detached + MainActor.run (LiveActivityPreviewView). Update legal
URLs from feels.88oakapps.com to reflect.88oakapps.com in SettingsView.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,11 +90,7 @@ class ShowBasedOnVoteLogics {
|
||||
date = Calendar.current.date(byAdding: .day, value: -1, to: now)
|
||||
}
|
||||
|
||||
guard let date = date else {
|
||||
fatalError("missing getCurrentVotingDate")
|
||||
}
|
||||
|
||||
return date
|
||||
return date ?? now
|
||||
}
|
||||
|
||||
static public func getVotingTitle(onboardingData: OnboardingData, now: Date = Date()) -> String {
|
||||
@@ -106,7 +102,7 @@ class ShowBasedOnVoteLogics {
|
||||
return String(localized: "add_mood_header_view_title_today")
|
||||
|
||||
case (false, .Previous):
|
||||
let date = Calendar.current.date(byAdding: .day, value: -2, to: now)!
|
||||
let date = Calendar.current.date(byAdding: .day, value: -2, to: now) ?? now
|
||||
return String(format: String(localized: "add_mood_header_view_title"), Random.weekdayName(fromDate: date))
|
||||
case (true, .Previous):
|
||||
return String(localized: "add_mood_header_view_title_yesterday")
|
||||
|
||||
Reference in New Issue
Block a user