fix: ensure timer is stopped if visibility is manually toggled

This commit is contained in:
Jonathon Terry 2024-08-03 14:53:09 -07:00 committed by GitHub
parent 2063b0e8e2
commit 1be1419ab4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ local function worker(user_args)
function calendar_widget.toggle() function calendar_widget.toggle()
if popup.visible then if popup.visible then
auto_hide_timer:stop()
-- to faster render the calendar refresh it and just hide -- 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(nil) -- the new date is not set without removing the old one
cal:set_date(os.date('*t')) cal:set_date(os.date('*t'))