-
-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Description
When keeping the computer turned on over night, the current day/ today day is not updated. To update the day, the calendar popup has to be closed (which triggers the update, see calendar.lua#L229-L234) and opened again.
I've changed L228-235 in calendar.lua and test it a few weeks (because I'm too lazy to learn Lua or something). I'll create a PR if I know more.
-- OLD
if popup.visible then
-- to faster render the calendar refresh it and just hide
cal:set_date(nil) -- the new date is not set without removing the old one
cal:set_date(os.date('*t'))
popup:set_widget(nil) -- just in case
popup:set_widget(cal)
popup.visible = not popup.visible
else
-- NEW (not tested yet but should work (tm))
if popup.visible then
-- to faster render the calendar refresh it and just hide
cal:set_date(nil) -- the new date is not set without removing the old one
popup:set_widget(nil) -- just in case
popup.visible = false
else
-- apply it when the calendar is opened! - probably slower but fixes the issue that the
-- day is not updated when *opening* the popup (only when closing)
cal:set_date(os.date('*t'))
popup:set_widget(cal)
Metadata
Metadata
Assignees
Labels
No labels