From e7d9463830a229986e3314f37236bbf9f73ab2f8 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Mon, 23 May 2022 01:22:08 +0200 Subject: [PATCH] Clear self.wrapped_leave_standby_task ASAP There are more _unschedule_standby callers than just onCloseWidget --- plugins/autosuspend.koplugin/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/autosuspend.koplugin/main.lua b/plugins/autosuspend.koplugin/main.lua index b73bf594a..46ecc5b70 100644 --- a/plugins/autosuspend.koplugin/main.lua +++ b/plugins/autosuspend.koplugin/main.lua @@ -185,7 +185,6 @@ function AutoSuspend:onCloseWidget() self:_unschedule_standby() self.standby_task = nil - self.wrapped_leave_standby_task = nil self.leave_standby_task = nil end @@ -208,6 +207,7 @@ function AutoSuspend:_unschedule_standby() if self.wrapped_leave_standby_task then logger.dbg("AutoSuspend: unschedule leave standby task wrapper") UIManager:unschedule(self.wrapped_leave_standby_task) + self.wrapped_leave_standby_task = nil end if self.leave_standby_task then