diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-15 18:30:16 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 02:54:17 +0000 |
| commit | 37c323481d2e124e75bf3480dbc3bf53cad915e0 (patch) | |
| tree | 18dcd09b2d9114fc7e849a52f7409d6750999cd0 /internal/handlers/widget.go | |
| parent | b55c01eb9c48d2af754ff22c55deab6f0832e358 (diff) | |
feat(tasks): thread project color from BuildTimeline to WidgetItem
Projects are fetched once per BuildTimeline call into a color lookup
map, not queried per-task -- same pattern as RecurringEventID's
existing TimelineItem->WidgetItem threading.
Diffstat (limited to 'internal/handlers/widget.go')
| -rw-r--r-- | internal/handlers/widget.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/handlers/widget.go b/internal/handlers/widget.go index 1bb706e..05c0bdb 100644 --- a/internal/handlers/widget.go +++ b/internal/handlers/widget.go @@ -97,6 +97,10 @@ func TimelineItemToWidgetItem(item models.TimelineItem) models.WidgetItem { wi.DueDate = &due } + if item.ProjectColor != "" { + wi.ProjectColor = &item.ProjectColor + } + return wi } |
