|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
/* globals config, app, ajaxify, define, socket, utils */
|
|
|
|
|
/* globals config, app, ajaxify, define, utils */
|
|
|
|
|
|
|
|
|
|
define('forum/topic/posts', [
|
|
|
|
|
'forum/pagination',
|
|
|
|
@ -71,7 +71,10 @@ define('forum/topic/posts', [
|
|
|
|
|
if (isPostVisible) {
|
|
|
|
|
createNewPosts(data, components.get('post').not('[data-index=0]'), direction, scrollToPost);
|
|
|
|
|
} else if (ajaxify.data.scrollToMyPost && parseInt(posts[0].uid, 10) === parseInt(app.user.uid, 10)) {
|
|
|
|
|
// https://github.com/NodeBB/NodeBB/issues/5004#issuecomment-247157441
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
pagination.loadPage(ajaxify.data.pagination.pageCount, scrollToPost);
|
|
|
|
|
}, 250);
|
|
|
|
|
} else {
|
|
|
|
|
updatePagination();
|
|
|
|
|
}
|
|
|
|
|