From af5a39ef759d010f5db6a011eb77dac1989c2fef Mon Sep 17 00:00:00 2001 From: Arindy Date: Wed, 31 Dec 2025 16:11:48 +0100 Subject: [PATCH] Move initialization of selectedMonth and selectedDay inside periodic update loop in YearMood widget --- widgets/yearMood.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/widgets/yearMood.go b/widgets/yearMood.go index 09e84ab..a1535ab 100644 --- a/widgets/yearMood.go +++ b/widgets/yearMood.go @@ -30,10 +30,9 @@ func YearMood() YearMoodOptions { func createYearMood(ctx context.Context, _ terminalapi.Terminal, _ interface{}) widgetapi.Widget { widget := util.PanicOnErrorWithResult(NewMoodText()) - widget.selectedMonth = time.Now().Month() - widget.selectedDay = time.Now().Day() - go util.Periodic(ctx, 1*time.Hour, func() error { + widget.selectedMonth = time.Now().Month() + widget.selectedDay = time.Now().Day() return widget.drawTable() })