mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #1869 from koreader/houqp-master
fix double crash in readerui...
This commit is contained in:
@@ -341,7 +341,7 @@ function ReaderUI:showReader(file)
|
||||
text = T( _("Opening file '%1'."), file),
|
||||
timeout = 0.1,
|
||||
})
|
||||
UIManager:scheduleIn(0.1, function()
|
||||
UIManager:nextTick(function()
|
||||
DEBUG("creating coroutine for showing reader")
|
||||
local co = coroutine.create(function()
|
||||
self:doShowReader(file)
|
||||
@@ -350,7 +350,7 @@ function ReaderUI:showReader(file)
|
||||
if err ~= nil or ok == false then
|
||||
print '[!] doShowReader coroutine crashed:'
|
||||
print(debug.traceback(co, err, 1))
|
||||
UIManager.quit()
|
||||
UIManager:quit()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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", self.fl_intensity)
|
||||
if KOBO_SYNC_BRIGHTNESS_WITH_NICKEL then
|
||||
NickelConf.frontLightLevel.set(self.fl_intensity)
|
||||
end
|
||||
|
||||
@@ -107,12 +107,14 @@ function ReaderStatistics:updateSettings()
|
||||
{
|
||||
text = "",
|
||||
input_type = "number",
|
||||
hint = _("Min seconds, default is 5"),
|
||||
hint = _(T("Min seconds, default is 5, current value: %1",
|
||||
self.page_min_read_sec)),
|
||||
},
|
||||
{
|
||||
text = "",
|
||||
input_type = "number",
|
||||
hint = _("Max seconds, default is 90"),
|
||||
hint = _(T("Max seconds, default is 90, current value: %1",
|
||||
self.page_max_read_sec)),
|
||||
},
|
||||
},
|
||||
buttons = {
|
||||
|
||||
Reference in New Issue
Block a user