mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
OPDS catalog, Cloud storage: hold return arrow to go to top (#7845)
This commit is contained in:
@@ -884,6 +884,20 @@ function OPDSBrowser:onReturn()
|
||||
return true
|
||||
end
|
||||
|
||||
function OPDSBrowser:onHoldReturn()
|
||||
if #self.paths > 1 then
|
||||
local path = self.paths[1]
|
||||
if path then
|
||||
for i = #self.paths, 2, -1 do
|
||||
table.remove(self.paths)
|
||||
end
|
||||
self.catalog_title = path.title
|
||||
self:updateCatalog(path.url, path.username, path.password)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function OPDSBrowser:onNext()
|
||||
-- self.page_num comes from menu.lua
|
||||
local page_num = self.page_num
|
||||
@@ -898,7 +912,6 @@ function OPDSBrowser:onNext()
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user