Minor state handling tweaks when the footer is disabled/invisible (#5494)

* Don't break `doc_pages` updates when it's completely disabled. (c.f., the commit's comment, doing it on every page turn seems a bit overkill, but I get that it's probably done that way because it was easier ;)).
* Detect the empty footerTextGenerator properly in `_updateFooterText` (it's `""`, not `nil`).
* Abort `_updateFooterText` early when the footer is invisible (and has been for a while/ever, i.e., when not requesting a repaint, like a mode switch would).
* Never send `SetBottomPageMargin` events twice.
* Minor tweaks to touchmenu & configdialog to avoid useless repaints (don't redraw the reader/fm unless we absolutely need to).
* Make sure we show the progress bar alone instead of nothing when disabling the last enabled mode in the menu.
This commit is contained in:
NiLuJe
2019-10-15 21:57:51 +02:00
committed by GitHub
parent 6082f84e13
commit f2f2aa6e4d
4 changed files with 46 additions and 25 deletions

View File

@@ -270,6 +270,9 @@ describe("Readerfooter module", function()
assert.is.same(1, footer.mode)
footer:onTapFooter()
assert.is.same(0, footer.mode)
-- Make it visible again to make the following tests behave...
footer:onTapFooter()
assert.is.same(1, footer.mode)
end)
it("should pick up screen resize in resetLayout", function()