mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Screensaver: Unbreak screensaver_stretch_images (#7403)
* Screensaver: Unbreak screensaver_stretch_images We don't have real ternary operators in Lua, if the second argument evaluates to false, it doesn't work. Invert the test to avoid this pitfall. (c.f., http://lua-users.org/wiki/TernaryOperator). Fix #7402, regression since #7371 * Free a few similar constructs (incidentally, some of 'em also tweaked in #7371 ^^).
This commit is contained in:
@@ -111,7 +111,7 @@ function ReaderTypeset:onReadSettings(config)
|
||||
self.smooth_scaling = config:isTrue("smooth_scaling")
|
||||
else
|
||||
local global = G_reader_settings:readSetting("copt_smooth_scaling")
|
||||
self.smooth_scaling = (global == nil or global == 0) and false or true
|
||||
self.smooth_scaling = global == 1 and true or false
|
||||
end
|
||||
self:toggleImageScaling(self.smooth_scaling)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user