From db8786f058369cb6a461895b5a39bcbb7c25f34a Mon Sep 17 00:00:00 2001 From: poire-z Date: Sun, 25 Aug 2024 20:40:06 +0200 Subject: [PATCH] ReaderRolling: fix batched notifications sometimes not shown When a profile changes a few settings (ie. font), a few notifications may be stacked, before the single rerendering happens. If that rendering takes some time, the notifications' timeout may close them as soon as it is done, before they get a chance to be painted/refreshed. So, delay a bit more that rerendering to be sure the notifications are shown. --- frontend/apps/reader/modules/readerrolling.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/apps/reader/modules/readerrolling.lua b/frontend/apps/reader/modules/readerrolling.lua index 377d18c06..70d1e4aa1 100644 --- a/frontend/apps/reader/modules/readerrolling.lua +++ b/frontend/apps/reader/modules/readerrolling.lua @@ -968,8 +968,8 @@ function ReaderRolling:onBatchedUpdateDone() if self.batched_update_count <= 0 then self.batched_update_count = 0 -- Be sure any Notification gets a chance to be painted before - -- a blocking rerendering - UIManager:nextTick(self.onUpdatePos, self) + -- a blocking rerendering (:nextTick() is not enough) + UIManager:tickAfterNext(self.onUpdatePos, self) end end