From 68dcc4f36c50d9dc89c2e865ca67e75a5f6626ca Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Mon, 10 Oct 2022 20:25:18 +0200 Subject: [PATCH] Bump base (#9618) * Bump base (https://github.com/koreader/koreader-base/pull/1534) * And some fixups following #9617 --- base | 2 +- frontend/ui/uimanager.lua | 3 ++- frontend/ui/widget/notification.lua | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base b/base index 0e12bee82..661e46790 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 0e12bee824c03a560db748a39480db6c9780a587 +Subproject commit 661e46790dbc74795deae5c3b00c04fa13bc14c9 diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index cda9c149f..6651e7597 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -824,7 +824,8 @@ function UIManager:sendEvent(event) if not checked_widgets[widget] then checked_widgets[widget] = true -- Widget's active widgets have precedence to handle this event - -- NOTE: ReaderUI & FileManager have their registered modules referenced as such. + -- NOTE: ReaderUI & FileManager *may* optionally register their modules as such + -- (currently, they only do that for the Screenshot module). if widget.active_widgets then for _, active_widget in ipairs(widget.active_widgets) do if active_widget:handleEvent(event) then diff --git a/frontend/ui/widget/notification.lua b/frontend/ui/widget/notification.lua index 7c4ffdb18..17b231656 100644 --- a/frontend/ui/widget/notification.lua +++ b/frontend/ui/widget/notification.lua @@ -121,8 +121,8 @@ function Notification:init() RectSpan:new{ -- have this VerticalGroup full width, to ensure centering width = Screen:getWidth(), - -- push this frame at its y=self.num position - height = notif_height * (self.num - 1) + self.margin, + -- push this frame at its y=self._shown_idx position + height = notif_height * (self._shown_idx - 1) + self.margin, -- (let's add a leading self.margin to get the same distance -- from top of screen to first notification top border as -- between borders of next notifications)