Fix: add WidgetDataRepository.isPendingCompletion predicate
Stream M's WidgetActionProcessorTest.kt references this predicate but Stream J's initial repo only exposed mark/clear mutators. Trivial addition: reads the pending-completion set and checks membership. Unblocks :composeApp:testDebugUnitTest (now green across all streams). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,10 @@ class WidgetDataRepository internal constructor(private val context: Context) {
|
||||
store.writePendingCompletionIds(current)
|
||||
}
|
||||
|
||||
/** Whether a task id is currently queued for optimistic completion. */
|
||||
suspend fun isPendingCompletion(taskId: Long): Boolean =
|
||||
taskId in store.readPendingCompletionIds()
|
||||
|
||||
/**
|
||||
* Compute the three summary counters shown on the widget:
|
||||
* - overdueCount — tasks with `isOverdue == true`
|
||||
|
||||
Reference in New Issue
Block a user