Skip to content

Commit

Permalink
Use user's per_page setting for all listings.
Browse files Browse the repository at this point in the history
  • Loading branch information
nottalulah committed Apr 22, 2024
1 parent 705b44d commit 05f44eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/logical/pagination_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class PaginationError < StandardError; end
# @param page_limit [Integer] the highest page the user can view
# @param count [Integer] the precalculated number of search results, or nil to calculate it
# @param search_count [Object] if truthy, don't calculate the number of results; assume a large number of results
def paginate(page, limit: nil, max_limit: 1000, page_limit: CurrentUser.user.page_limit, count: nil, search_count: nil)
@records_per_page = limit || Danbooru.config.posts_per_page
def paginate(page, limit: CurrentUser.user.per_page, max_limit: 1000, page_limit: CurrentUser.user.page_limit, count: nil, search_count: nil)
@records_per_page = limit
@records_per_page = @records_per_page.to_i.clamp(1, max_limit)
@paginator_page_limit = page_limit

Expand Down

0 comments on commit 05f44eb

Please sign in to comment.