ReaderFooter/Header: Refine autorefresh repaint-or-not checks (#10045)

Use both a whitelist for targeted widget repaints, a blacklist for no repaint at all, and a fallback for a full in-order ReaderUI repaint when unsure.

Use a similar approach in ReaderHeader (i.e., prevent explicit refreshes while ReaderMenu is open).

Re #9979, re #9768
This commit is contained in:
NiLuJe
2023-02-02 00:29:23 +01:00
committed by GitHub
parent 747c3eaf9d
commit 21210800c1
10 changed files with 67 additions and 70 deletions

View File

@@ -54,7 +54,8 @@ function ReaderStatus:onEndOfBook()
self:onMarkBook(true)
end
if (settings == "pop-up" or settings == nil) and UIManager:getNthTopWidget().name ~= "end_document" then
local top_wg = UIManager:getTopmostVisibleWidget() or {}
if (settings == "pop-up" or settings == nil) and top_wg.name ~= "end_document" then
local buttons = {
{
{