From ebf2a2c5afa31e69eb94901f8801620fe5f6fcd4 Mon Sep 17 00:00:00 2001 From: Nephilim Date: Fri, 5 Dec 2025 11:26:53 -0600 Subject: [PATCH] fix: respect user pagination settings in infinite scroll (#13765) (#13788) - Changed hardcoded topicsPerPage value of 20 to use settings.topicsPerPage - Allows infinite scroll to respect user's configured page size preference - Consistent with pagination handling in other controllers (category.js, recent.js, etc) - Validates against admin's maxTopicsPerPage setting - Fixes issue where all users were limited to 20 topics per request regardless of settings --- src/api/categories.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/categories.js b/src/api/categories.js index 476a0d4d9d..4806868f93 100644 --- a/src/api/categories.js +++ b/src/api/categories.js @@ -126,7 +126,7 @@ categoriesAPI.getTopics = async (caller, data) => { throw new Error('[[error:no-privileges]]'); } - const infScrollTopicsPerPage = 20; + const infScrollTopicsPerPage = settings.topicsPerPage; const sort = data.sort || data.categoryTopicSort || meta.config.categoryTopicSort || 'recently_replied'; let start = Math.max(0, parseInt(data.after || 0, 10));