dont remove topics if selection is in progress
v1.18.x
barisusakli 9 years ago
parent c8edb6de29
commit 4bff714947

@ -8,8 +8,10 @@ define('forum/category', [
'forum/categoryTools', 'forum/categoryTools',
'sort', 'sort',
'components', 'components',
'translator' 'translator',
], function(infinitescroll, share, navigator, categoryTools, sort, components, translator) { 'topicSelect',
'forum/pagination'
], function(infinitescroll, share, navigator, categoryTools, sort, components, translator, topicSelect, pagination) {
var Category = {}; var Category = {};
$(window).on('action:ajaxify.start', function(ev, data) { $(window).on('action:ajaxify.start', function(ev, data) {
@ -254,8 +256,9 @@ define('forum/category', [
}; };
function loadTopicsAfter(after, direction, callback) { function loadTopicsAfter(after, direction, callback) {
callback = callback || function() {};
if (!utils.isNumber(after) || (after === 0 && components.get('category/topic', 'index', 0).length)) { if (!utils.isNumber(after) || (after === 0 && components.get('category/topic', 'index', 0).length)) {
return; return callback();
} }
$(window).trigger('action:categories.loading'); $(window).trigger('action:categories.loading');
@ -272,6 +275,7 @@ define('forum/category', [
} }
$(window).trigger('action:categories.loaded'); $(window).trigger('action:categories.loaded');
callback();
}); });
} }
@ -322,7 +326,9 @@ define('forum/category', [
$('[component="category"]').append(html); $('[component="category"]').append(html);
} }
infinitescroll.removeExtra($('[component="category/topic"]'), direction, 60); if (!topicSelect.getSelectedTids().length) {
infinitescroll.removeExtra($('[component="category/topic"]'), direction, 60);
}
html.find('.timeago').timeago(); html.find('.timeago').timeago();
app.createUserTooltips(); app.createUserTooltips();

Loading…
Cancel
Save