mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
bf6c0cdd6c
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default. Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved. (Fixes an issue reported on Gitter). * LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings. * Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses. * FileChooser: Implement an extended default exclusion list (fix #2360) * ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
18 lines
575 B
Lua
18 lines
575 B
Lua
local InfoMessage = require("ui/widget/infomessage")
|
|
local UIManager = require("ui/uimanager")
|
|
local _ = require("gettext")
|
|
|
|
return {
|
|
text = _("Disable double tap"),
|
|
checked_func = function()
|
|
return G_reader_settings:nilOrTrue("disable_double_tap")
|
|
end,
|
|
callback = function()
|
|
local disabled = G_reader_settings:nilOrTrue("disable_double_tap")
|
|
G_reader_settings:saveSetting("disable_double_tap", not disabled)
|
|
UIManager:show(InfoMessage:new{
|
|
text = _("This will take effect on next restart."),
|
|
})
|
|
end,
|
|
}
|