mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
fix navigator
This commit is contained in:
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user