diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-12 10:21:36 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-12 10:21:36 +0000 |
| commit | 437ee6b10462909fb2db677a64be264d811a2e1c (patch) | |
| tree | 29291d12c3590e5611eaf11e0a8182324fa7c42e /internal/handlers/widget.go | |
| parent | c0454371a044ef4f20bfe44ee9f183fb336656dd (diff) | |
feat(widget): add DueDate field for doot tasks to the widget API
Diffstat (limited to 'internal/handlers/widget.go')
| -rw-r--r-- | internal/handlers/widget.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/handlers/widget.go b/internal/handlers/widget.go index f8a63a0..3a30fcf 100644 --- a/internal/handlers/widget.go +++ b/internal/handlers/widget.go @@ -76,6 +76,15 @@ func TimelineItemToWidgetItem(item models.TimelineItem) models.WidgetItem { } } + // DueDate is independent of Start/IsAllDay -- doot tasks deliberately + // keep Start nil (see the "floating task" doc comment above) so the + // client's SlotPacker positions them, but the Android detail popup + // still needs to know the real due date to display and reschedule it. + if item.Type == models.TimelineItemTypeTask && item.Source == "doot" && !item.Time.IsZero() { + due := item.Time + wi.DueDate = &due + } + return wi } |
