|
|
|
@ -6,6 +6,9 @@ local Screen = require("device").screen
|
|
|
|
|
local DEBUG = require("dbg")
|
|
|
|
|
local _ = require("gettext")
|
|
|
|
|
local Blitbuffer = require("ffi/blitbuffer")
|
|
|
|
|
local ReaderUI = require("apps/reader/readerui")
|
|
|
|
|
local ConfirmBox = require("ui/widget/confirmbox")
|
|
|
|
|
local T = require("ffi/util").template
|
|
|
|
|
|
|
|
|
|
local OPDSCatalog = InputContainer:extend{
|
|
|
|
|
title = _("OPDS Catalog"),
|
|
|
|
@ -43,6 +46,16 @@ function OPDSCatalog:init()
|
|
|
|
|
is_borderless = true,
|
|
|
|
|
has_close_button = true,
|
|
|
|
|
close_callback = function() return self:onClose() end,
|
|
|
|
|
file_downloaded_callback = function(downloaded_file)
|
|
|
|
|
UIManager:show(ConfirmBox:new{
|
|
|
|
|
text = T(_("File saved to:\n %1\nWould you like to read the downloaded book now?"),
|
|
|
|
|
downloaded_file),
|
|
|
|
|
ok_callback = function()
|
|
|
|
|
self:onClose()
|
|
|
|
|
ReaderUI:showReader(downloaded_file)
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
end,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self[1] = FrameContainer:new{
|
|
|
|
|