mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Implement back_to_exit option (#3838)
Also goes back to File Manager as default view first.
This commit is contained in:
committed by
Frans de Jonge
parent
ab712f1a29
commit
5aacc761e1
@@ -125,6 +125,48 @@ if Device:isAndroid() then
|
||||
table.insert(common_settings.screen.sub_item_table, require("ui/elements/screen_fullscreen_menu_table"))
|
||||
end
|
||||
|
||||
if Device:hasKeys() then
|
||||
common_settings.navigation = {
|
||||
text = _("Navigation"),
|
||||
sub_item_table = {
|
||||
{
|
||||
text = _("Back key to exit KOReader"),
|
||||
sub_item_table = {
|
||||
{
|
||||
text = _("Prompt"),
|
||||
checked_func = function()
|
||||
local setting = G_reader_settings:readSetting("back_to_exit")
|
||||
return setting == "prompt" or setting == nil
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("back_to_exit", "prompt")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Always"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("back_to_exit")
|
||||
== "always"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("back_to_exit", "always")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Disable"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("back_to_exit")
|
||||
== "disable"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("back_to_exit", "disable")
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
common_settings.document = {
|
||||
text = _("Document"),
|
||||
sub_item_table = {
|
||||
|
||||
Reference in New Issue
Block a user