mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
fix: switch inf. scroll to xhr (#9854)
this fixes infinitescroll when url has custom query parameters also fixes infinitescroll for plugins like QnA fixes infinitescroll on tags page deprecate topics.loadMoreSortedTopics deprecate topics.loadMoreFromSet
This commit is contained in:
committed by
GitHub
parent
cb25faaa2d
commit
4404e81991
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const winston = require('winston');
|
||||
|
||||
const topics = require('../../topics');
|
||||
const privileges = require('../../privileges');
|
||||
const meta = require('../../meta');
|
||||
@@ -62,6 +64,7 @@ module.exports = function (SocketTopics) {
|
||||
};
|
||||
|
||||
SocketTopics.loadMoreSortedTopics = async function (socket, data) {
|
||||
winston.warn('[deprecated] use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
||||
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
@@ -85,6 +88,7 @@ module.exports = function (SocketTopics) {
|
||||
};
|
||||
|
||||
SocketTopics.loadMoreFromSet = async function (socket, data) {
|
||||
winston.warn('[deprecated] use infinitescroll.loadMoreXhr'); // TODO: remove in 1.19.0
|
||||
if (!data || !utils.isNumber(data.after) || parseInt(data.after, 10) < 0 || !data.set) {
|
||||
throw new Error('[[error:invalid-data]]');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user