|
|
@ -70,10 +70,12 @@ function FileManager:onSetRotationMode(rotation)
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function FileManager:setRotationMode()
|
|
|
|
-- init should be set to True when starting the FM for the first time
|
|
|
|
|
|
|
|
-- (not coming from the reader). This allows the default to be properly set.
|
|
|
|
|
|
|
|
function FileManager:setRotationMode(init)
|
|
|
|
local locked = G_reader_settings:readSetting("lock_rotation")
|
|
|
|
local locked = G_reader_settings:readSetting("lock_rotation")
|
|
|
|
local rotation_mode = G_reader_settings:readSetting("fm_rotation_mode") or 0
|
|
|
|
local rotation_mode = G_reader_settings:readSetting("fm_rotation_mode") or Screen.ORIENTATION_PORTRAIT
|
|
|
|
if locked then
|
|
|
|
if locked or init then
|
|
|
|
self:onSetRotationMode(rotation_mode)
|
|
|
|
self:onSetRotationMode(rotation_mode)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|