diff --git a/composeApp/src/androidMain/kotlin/com/tt/honeyDue/widget/WidgetDataRepository.kt b/composeApp/src/androidMain/kotlin/com/tt/honeyDue/widget/WidgetDataRepository.kt index cd7c00d..133fe57 100644 --- a/composeApp/src/androidMain/kotlin/com/tt/honeyDue/widget/WidgetDataRepository.kt +++ b/composeApp/src/androidMain/kotlin/com/tt/honeyDue/widget/WidgetDataRepository.kt @@ -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`