mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 23:45:45 +01:00
Recent refactor (#6879)
* wip * fix inf scroll * remove duplicated code * remove dupe code in /unread * use topicList * update tag page to use topicList * fix tests * combine ifs * remove more dupe code * disable timeout
This commit is contained in:
committed by
GitHub
parent
aa301f27a1
commit
c27be9db5a
@@ -46,6 +46,7 @@ Topics.getTopicsFromSet = function (set, uid, start, stop, callback) {
|
||||
Topics.getTopics(tids, uid, next);
|
||||
},
|
||||
function (topics, next) {
|
||||
Topics.calculateTopicIndices(topics, start);
|
||||
next(null, { topics: topics, nextStart: stop + 1 });
|
||||
},
|
||||
], callback);
|
||||
@@ -237,7 +238,7 @@ function getMainPostAndReplies(topic, set, uid, start, stop, reverse, callback)
|
||||
replies = posts.slice(1);
|
||||
}
|
||||
|
||||
Topics.calculatePostIndices(replies, start, stop, topic.postcount, reverse);
|
||||
Topics.calculatePostIndices(replies, start, topic.postcount, reverse);
|
||||
|
||||
Topics.addPostData(posts, uid, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user