mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
Merge pull request #1911 from koreader/houqp-master
fix(credocument): bump base to fix empty text search crash
This commit is contained in:
commit
cdae6e8e07
2
base
2
base
@ -1 +1 @@
|
||||
Subproject commit b4b578c0b9f2108231af33acb6534c526daab9ed
|
||||
Subproject commit aee39bc8c452a56ee08c39d37a631e897c34b2ec
|
@ -49,14 +49,12 @@ end
|
||||
function NickelConf.frontLightLevel.get()
|
||||
local new_intensity = NickelConf._read_kobo_conf(re_FrontLightLevel)
|
||||
if new_intensity then
|
||||
new_intensity = tonumber(new_intensity)
|
||||
end
|
||||
|
||||
-- In NickelConfSpec, require("device") won't return KoboDevice
|
||||
local powerd = require("device/kobo/powerd")
|
||||
if new_intensity then
|
||||
return powerd:normalizeIntensity(new_intensity)
|
||||
-- we need 0 to signal frontlight off for device that does not support
|
||||
-- FrontLightState config, so don't normalize the value here yet.
|
||||
return tonumber(new_intensity)
|
||||
else
|
||||
-- In NickelConfSpec, require("device") won't return KoboDevice
|
||||
local powerd = require("device/kobo/powerd")
|
||||
local fallback_fl_level = powerd.fl_intensity or 1
|
||||
assert(NickelConf.frontLightLevel.set(fallback_fl_level))
|
||||
return fallback_fl_level
|
||||
|
Loading…
Reference in New Issue
Block a user