Partial rerendering: really avoid flash on reload (#10155)

Also restore input if ReaderUI crashed.
Also avoid refresh_count management when "Full refresh
rate" is set to "never".
This commit is contained in:
poire-z
2023-02-22 20:32:13 +01:00
committed by GitHub
parent 6ad3371cd8
commit b610facfdc
2 changed files with 12 additions and 1 deletions

View File

@@ -608,6 +608,9 @@ function ReaderUI:showReaderCoroutine(file, provider, seamless)
if err ~= nil or ok == false then
io.stderr:write('[!] doShowReader coroutine crashed:\n')
io.stderr:write(debug.traceback(co, err, 1))
-- Restore input if we crashed before ReaderUI has restored it
Device:setIgnoreInput(false)
Input:inhibitInputUntil(0.2)
UIManager:show(InfoMessage:new{
text = _("No reader engine for this file or invalid file.")
})
@@ -617,6 +620,9 @@ function ReaderUI:showReaderCoroutine(file, provider, seamless)
end
function ReaderUI:doShowReader(file, provider, seamless)
if seamless then
UIManager:avoidFlashOnNextRepaint()
end
logger.info("opening file", file)
-- Only keep a single instance running
if ReaderUI.instance then