Skip to content

Node.js based forum software built for the modern web

fixed infinite load and select

barisusaklid1ec101248b0
diff --git a/public/src/forum/popular.js b/public/src/forum/popular.js
index c4817bbd71..5b99451cf3 100644
--- a/public/src/forum/popular.js
+++ b/public/src/forum/popular.js
@@ -35,7 +35,7 @@ define(['forum/recent'], function(recent) {
}
if (data.topics && data.topics.length) {
- recent.onTopicsLoaded('popular', data.topics);
+ recent.onTopicsLoaded('popular', data.topics, false);
$('#topics-container').attr('data-nextstart', data.nextStart);
} else {
$('#load-more-btn').hide();
diff --git a/public/src/forum/recent.js b/public/src/forum/recent.js
index 17d5abedc8..1af4e764a5 100644
--- a/public/src/forum/recent.js
+++ b/public/src/forum/recent.js
@@ -107,7 +107,7 @@ define(function() {
}
if (data.topics && data.topics.length) {
- Recent.onTopicsLoaded('recent', data.topics);
+ Recent.onTopicsLoaded('recent', data.topics, false);
$('#topics-container').attr('data-nextstart', data.nextStart);
}
@@ -115,9 +115,9 @@ define(function() {
});
}
- Recent.onTopicsLoaded = function(templateName, topics) {
+ Recent.onTopicsLoaded = function(templateName, topics, showSelect) {
ajaxify.loadTemplate(templateName, function(template) {
- var html = templates.parse(templates.getBlock(template, 'topics'), {topics: topics});
+ var html = templates.parse(templates.getBlock(template, 'topics'), {topics: topics, showSelect: showSelect});
translator.translate(html, function(translatedHTML) {
$('#category-no-topics').remove();
diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js
index 3cac9fd7e5..ef53c3dbc3 100644
--- a/public/src/forum/unread.js
+++ b/public/src/forum/unread.js
@@ -114,7 +114,7 @@ define(['forum/recent'], function(recent) {
}
if (data.topics && data.topics.length) {
- recent.onTopicsLoaded('unread', data.topics);
+ recent.onTopicsLoaded('unread', data.topics, true);
$('#topics-container').attr('data-nextstart', data.nextStart);
} else {
$('#load-more-btn').hide();