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)
This commit is contained in:
yparitcher
2020-12-23 00:16:56 -05:00
parent c3fd6ae38b
commit 405c48b6ea

View File

@@ -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,