Notification: Fence the *display* update in an attempt to avoid upsetting some boards... (#10083)

Re: https://github.com/koreader/koreader/issues/9806#issuecomment-1416827447

Depends on https://github.com/koreader/koreader-base/pull/1576

Includes assorted cosmetics tweaks related to duplicate `setDirty` calls when instantiating widgets that already have an `onShow` handler doing it. (I left widgets doing it in `update` instead of `init` alone, on the assumption that callers *may* be relying on that behavior when updating widgets at runtime. This might actually never matter, and it certainly didn't for ScreenSaverWidget, which is why I removed it from there ;p).
This commit is contained in:
NiLuJe
2023-02-07 01:01:05 +01:00
committed by GitHub
parent 4e944dc918
commit 45a4aac3d3
20 changed files with 54 additions and 58 deletions

View File

@@ -430,14 +430,14 @@ end
function ReaderFont:onIncreaseFontSize(ges)
local delta_int = self:gesToFontSize(ges)
Notification:notify(_("Increasing font size…"), true)
Notification:notify(_("Increasing font size…"), nil, true)
self:onChangeSize(delta_int)
return true
end
function ReaderFont:onDecreaseFontSize(ges)
local delta_int = self:gesToFontSize(ges)
Notification:notify(_("Decreasing font size…"), true)
Notification:notify(_("Decreasing font size…"), nil, true)
self:onChangeSize(-delta_int)
return true
end