Skip to content

Commit

Permalink
OPDS: Fixup the last commit
Browse files Browse the repository at this point in the history
We don't want to actually change the page when we request a fill on the
initial fetch.
  • Loading branch information
NiLuJe committed Jun 4, 2024
1 parent 059da21 commit a14ac16
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plugins/opds.koplugin/opdsbrowser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ function OPDSBrowser:updateCatalog(item_url, paths_updated)
self:addSubCatalog(item_url)
end
if self.page_num <= 1 then
self:onNextPage()
-- Request more content, but don't change the page
self:onNextPage(true)
end
end
end
Expand Down Expand Up @@ -886,7 +887,7 @@ function OPDSBrowser:onHoldReturn()
end

-- Menu action on next-page chevron tap (request and show more catalog entries)
function OPDSBrowser:onNextPage()
function OPDSBrowser:onNextPage(fill_only)
-- self.page_num comes from menu.lua
local page_num = self.page_num
-- fetch more entries until we fill out one page or reach the end
Expand All @@ -900,8 +901,10 @@ function OPDSBrowser:onNextPage()
break
end
end
-- We also *do* want to paginate, so call the base class.
Menu.onNextPage(self)
if not fill_only then
-- We also *do* want to paginate, so call the base class.
Menu.onNextPage(self)
end
return true
end

Expand Down

0 comments on commit a14ac16

Please sign in to comment.