From 405c48b6eaf62ee3da04b0c55eca158de192d175 Mon Sep 17 00:00:00 2001 From: yparitcher Date: Wed, 23 Dec 2020 00:16:56 -0500 Subject: [PATCH] Show only 1 End Document Dialog at a time if scrolling past the end of a document the EndOfBook event get fired once per scroll (a lot) --- frontend/apps/reader/modules/readerstatus.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerstatus.lua b/frontend/apps/reader/modules/readerstatus.lua index b3abbb5c2..b83b522c9 100644 --- a/frontend/apps/reader/modules/readerstatus.lua +++ b/frontend/apps/reader/modules/readerstatus.lua @@ -60,7 +60,7 @@ function ReaderStatus:onEndOfBook() self:onMarkBook(true) end - if settings == "pop-up" or settings == nil then + if (settings == "pop-up" or settings == nil) and UIManager:getTopWidget() ~= "end_document" then local buttons = { { { @@ -128,6 +128,7 @@ function ReaderStatus:onEndOfBook() }, } choose_action = ButtonDialogTitle:new{ + name = "end_document", title = _("You've reached the end of the document.\nWhat would you like to do?"), title_align = "center", buttons = buttons,