kobo: move reader setting outside of nicke_conf module

This commit is contained in:
Qingping Hou
2016-03-02 23:25:39 -08:00
parent 58e7103c34
commit cf70e86552
2 changed files with 2 additions and 3 deletions

View File

@@ -130,9 +130,6 @@ end
function NickelConf.frontLightLevel.set(new_intensity)
assert(new_intensity >= 0 and new_intensity <= 100,
"Wrong brightness value given!")
-- Make sure we're in sync with KOReader on the config level, too
G_reader_settings:saveSetting("frontlight_intensity",
new_intensity)
return NickelConf._write_kobo_conf(re_FrontLightLevel,
front_light_level_str,
new_intensity)

View File

@@ -55,6 +55,8 @@ end
function KoboPowerD:setIntensityHW()
if self.fl ~= nil then
self.fl:setBrightness(self.fl_intensity)
-- Make sure we persist intensity config in reader setting
G_reader_settings:saveSetting("frontlight_intensity", new_intensity)
if KOBO_SYNC_BRIGHTNESS_WITH_NICKEL then
NickelConf.frontLightLevel.set(self.fl_intensity)
end