Changed first_page type to Bool

This commit is contained in:
RadoslavL 2023-09-27 19:22:34 +03:00
parent 509bace7d1
commit 58bad6180f
2 changed files with 3 additions and 3 deletions

View File

@ -90,14 +90,14 @@ module Invidious::Frontend::Pagination
end end
end end
def nav_ctoken(locale : String?, *, base_url : String | URI, ctoken : String?, first_page : String?) def nav_ctoken(locale : String?, *, base_url : String | URI, ctoken : String?, first_page : Bool?)
return String.build do |str| return String.build do |str|
str << %(<div class="h-box">\n) str << %(<div class="h-box">\n)
str << %(<div class="page-nav-container flexible">\n) str << %(<div class="page-nav-container flexible">\n)
str << %(<div class="page-prev-container flex-left">) str << %(<div class="page-prev-container flex-left">)
if !first_page.nil? if !first_page?
self.first_page(str, locale, base_url.to_s) self.first_page(str, locale, base_url.to_s)
end end

View File

@ -21,7 +21,7 @@
page_nav_html = IV::Frontend::Pagination.nav_ctoken(locale, page_nav_html = IV::Frontend::Pagination.nav_ctoken(locale,
base_url: relative_url, base_url: relative_url,
ctoken: next_continuation, ctoken: next_continuation,
first_page: continuation first_page: continuation.nil?
) )
%> %>