mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
da00b4b8a9
While looking into #1219 I accidentally ended up refactoring some stuff. Tested in emulator and on H2O, but be wary because I might have overlooked something.
30 lines
782 B
Lua
30 lines
782 B
Lua
local Device = require("device")
|
|
local InfoMessage = require("ui/widget/infomessage")
|
|
local UIManager = require("ui/uimanager")
|
|
local _ = require("gettext")
|
|
|
|
local common_info = {}
|
|
|
|
if Device:isKindle() or Device:isKobo() then
|
|
local OTAManager = require("ui/otamanager")
|
|
table.insert(common_info, OTAManager:getOTAMenuTable())
|
|
end
|
|
table.insert(common_info, {
|
|
text = _("Version"),
|
|
callback = function()
|
|
UIManager:show(InfoMessage:new{
|
|
text = io.open("git-rev", "r"):read(),
|
|
})
|
|
end
|
|
})
|
|
table.insert(common_info, {
|
|
text = _("Help"),
|
|
callback = function()
|
|
UIManager:show(InfoMessage:new{
|
|
text = _("Please report bugs to \nhttps://github.com/koreader/koreader/issues"),
|
|
})
|
|
end
|
|
})
|
|
|
|
return common_info
|