Use ReaderFrontLight:addToMainMenu in FM

Check if frontlight is present using the same method as ReaderFrontLight:init,
just for consistency.
pull/238/head
Paulo Matias 11 years ago
parent 3d04925109
commit 92e12d6466

@ -49,13 +49,8 @@ function FileManagerMenu:setUpdateItemTable()
widget:addToMainMenu(self.tab_item_table)
end
if Device:hasFrontlight() then
table.insert(self.tab_item_table.main, {
text = _("Frontlight settings"),
callback = function()
ReaderFrontLight:onShowFlDialog()
end
})
if Device:getFrontlight() ~= nil then
ReaderFrontLight:addToMainMenu(self.tab_item_table)
end
table.insert(self.tab_item_table.main, {
text = _("Help"),

Loading…
Cancel
Save