From eda37036351fb633ae9c62bb57ba185067caa943 Mon Sep 17 00:00:00 2001 From: Ksaper Date: Sun, 19 Feb 2023 02:25:43 +0200 Subject: [PATCH] Use the start_new func --- widget/app_launcher/init.lua | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/widget/app_launcher/init.lua b/widget/app_launcher/init.lua index 3dfd9e9..2c971bc 100644 --- a/widget/app_launcher/init.lua +++ b/widget/app_launcher/init.lua @@ -624,28 +624,18 @@ function app_launcher:show() if animation.x then animation.x.ended:unsubscribe() animation.x:set(self._private.widget.goal_x) - gtimer { - timeout = 0.01, - call_now = false, - autostart = true, - single_shot = true, - callback = function() - screen.app_launcher.visible = true - end - } + gtimer.start_new(0.01, function() + screen.app_launcher.visible = true + return false + end) end if animation.y then animation.y.ended:unsubscribe() animation.y:set(self._private.widget.goal_y) - gtimer { - timeout = 0.01, - call_now = false, - autostart = true, - single_shot = true, - callback = function() - screen.app_launcher.visible = true - end - } + gtimer.start_new(0.01, function() + screen.app_launcher.visible = true + return false + end) end else screen.app_launcher.visible = true