This commit is contained in:
Trey t
2025-11-05 18:16:46 -06:00
parent b2b8cc62de
commit 6bad8d6b5a
13 changed files with 401 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ class LookupsManager: ObservableObject {
@Published var taskFrequencies: [TaskFrequency] = []
@Published var taskPriorities: [TaskPriority] = []
@Published var taskStatuses: [TaskStatus] = []
@Published var allTasks: [CustomTask] = []
@Published var isLoading: Bool = false
@Published var isInitialized: Bool = false
@@ -58,6 +59,13 @@ class LookupsManager: ObservableObject {
}
}
// Observe all tasks
Task {
for await tasks in repository.allTasks.taskTaskAsyncSequence {
self.allTasks = tasks
}
}
// Observe loading state
Task {
for await loading in repository.isLoading.boolAsyncSequence {

View File

@@ -65,7 +65,11 @@ extension Kotlinx_coroutines_coreStateFlow {
return asAsyncSequence()
}
var taskTaskAsyncSequence: AsyncStream<[CustomTask]> {
return asAsyncSequence()
}
var boolAsyncSequence: AsyncStream<Bool> {
return asAsyncSequence()
}
}
}