fix navigator

v1.18.x
barisusakli 10 years ago
parent 5a8babdde5
commit a0c3ddc555

@ -84,8 +84,8 @@ define('forum/category', [
};
Category.toBottom = function() {
socket.emit('categories.getTopicCount', ajaxify.variables.get('category_id'), function(err, index) {
navigator.scrollBottom(index);
socket.emit('categories.getTopicCount', ajaxify.variables.get('category_id'), function(err, count) {
navigator.scrollBottom(count - 1);
});
};

@ -78,7 +78,7 @@ define('forum/topic', [
if (config.topicPostSort !== 'oldest_to_newest') {
postCount = 2;
}
navigator.scrollBottom(postCount);
navigator.scrollBottom(postCount - 1);
});
};

@ -138,7 +138,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
if ($('li[data-index="' + index + '"]').length) {
navigator.scrollToPost(index, true);
} else {
index = parseInt(index, 10);
index = parseInt(index, 10) + 1;
ajaxify.go(generateUrl(index));
}
};

Loading…
Cancel
Save