2
0
mirror of https://github.com/koreader/koreader synced 2024-11-18 03:25:46 +00:00

[UX] CoverBrowser: set default display modes on first launch (#3834)

This commit is contained in:
poire-z 2018-04-06 18:14:49 +02:00 committed by Frans de Jonge
parent eb613ace3e
commit cc7ef363e5

View File

@ -58,6 +58,18 @@ function CoverBrowser:init()
return
end
-- Set up default display modes on first launch
if not G_reader_settings:isTrue("coverbrowser_initial_default_setup_done") then
-- Only if no display mode has been set yet
if not BookInfoManager:getSetting("filemanager_display_mode")
and not BookInfoManager:getSetting("history_display_mode") then
logger.info("CoverBrowser: setting default display modes")
BookInfoManager:saveSetting("filemanager_display_mode", "list_image_meta")
BookInfoManager:saveSetting("history_display_mode", "mosaic_image")
end
G_reader_settings:saveSetting("coverbrowser_initial_default_setup_done", true)
end
self:setupFileManagerDisplayMode(BookInfoManager:getSetting("filemanager_display_mode"))
self:setupHistoryDisplayMode(BookInfoManager:getSetting("history_display_mode"))
init_done = true