Fix iOS widget to use App Group shared data and add large widget view

- Create WidgetDataManager to write task data as JSON to App Group shared container
- Update widget CacheManager to read from App Group file instead of UserDefaults
- Add LargeWidgetView for .systemLarge widget family showing 5-6 tasks
- Add widget data save in AllTasksView after tasks load successfully
- Clear widget cache on logout in AuthenticationManager
- Add residenceName and isOverdue fields to widget task model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-25 20:41:02 -06:00
parent a0b038403c
commit d3e77326aa
4 changed files with 501 additions and 24 deletions

View File

@@ -281,10 +281,14 @@ struct AllTasksView: View {
do {
let result = try await APILayer.shared.getTasks(forceRefresh: forceRefresh)
await MainActor.run {
if let success = result as? ApiResultSuccess<TaskColumnsResponse> {
self.tasksResponse = success.data
if let success = result as? ApiResultSuccess<TaskColumnsResponse>,
let data = success.data {
self.tasksResponse = data
self.isLoadingTasks = false
self.tasksError = nil
// Update widget data
WidgetDataManager.shared.saveTasks(from: data)
} else if let error = result as? ApiResultError {
self.tasksError = error.message
self.isLoadingTasks = false