Migrate from iOS 17 Observation to iOS 16-compatible Combine architecture.

Lower deployment target to iOS 16, replace @Observable with ObservableObject, add navigation and UI compatibility shims, and include login smoke UI tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 10:16:35 +08:00
parent c32a610ee0
commit 26f4d0e671
127 changed files with 2320 additions and 1465 deletions

View File

@ -11,14 +11,14 @@ import UniformTypeIdentifiers
///
struct TaskCreateView: View {
@Environment(AccountContext.self) private var accountContext
@Environment(TaskAPI.self) private var taskAPI
@Environment(OSSUploadService.self) private var ossUploadService
@Environment(ToastCenter.self) private var toastCenter
@EnvironmentObject private var accountContext: AccountContext
@Environment(\.taskAPI) private var taskAPI
@Environment(\.ossUploadService) private var ossUploadService
@EnvironmentObject private var toastCenter: ToastCenter
@Environment(\.dismiss) private var dismiss
@Environment(\.globalLoading) private var globalLoading
@State private var viewModel = TaskCreateViewModel()
@StateObject private var viewModel = TaskCreateViewModel()
@State private var showOrderSelection = false
@State private var showCloudSelection = false
@State private var pickerItems: [PhotosPickerItem] = []
@ -60,7 +60,7 @@ struct TaskCreateView: View {
}
}
}
.onChange(of: pickerItems) { _, items in
.onChange(of: pickerItems) { items in
Task { await importPickerItems(items) }
}
}