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:
Trey T
2026-04-18 12:56:20 -05:00
parent ee135c4673
commit 7d71408bcc

View File

@@ -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`