mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 08:19:05 +00:00
Merge commit '98237207e67697abffc6b141f2388e3d8c925260' into glitch-soc/merge-upstream
Conflicts: - `app/helpers/application_helper.rb`: Upstream refactored some helpers and moved them in another file. Not a real conflict, but glitch-soc had adjacent glitch-only definitions. Kept glitch-soc definitions where they are and moved upstream ones as upstream did.
This commit is contained in:
@@ -75,13 +75,17 @@ class Api::V1::Notifications::RequestsController < Api::BaseController
|
||||
end
|
||||
|
||||
def next_path
|
||||
api_v1_notifications_requests_url pagination_params(max_id: pagination_max_id) unless @requests.empty?
|
||||
api_v1_notifications_requests_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||
end
|
||||
|
||||
def prev_path
|
||||
api_v1_notifications_requests_url pagination_params(min_id: pagination_since_id) unless @requests.empty?
|
||||
end
|
||||
|
||||
def records_continue?
|
||||
@requests.size == limit_param(DEFAULT_ACCOUNTS_LIMIT)
|
||||
end
|
||||
|
||||
def pagination_max_id
|
||||
@requests.last.id
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user