Merge pull request #4457 from boomzillawtf/master

Fix defaults for 'scroll to my post'
v1.18.x
Barış Soner Uşaklı 9 years ago
commit 21c451c3fe

@ -62,7 +62,7 @@ define('forum/topic/posts', [
if (isPostVisible) {
createNewPosts(data, components.get('post').not('[data-index=0]'), direction, scrollToPost);
} else if (config.scrollToMyPost && parseInt(posts[0].uid, 10) === parseInt(app.user.uid, 10)) {
} else if (ajaxify.data.scrollToMyPost && parseInt(posts[0].uid, 10) === parseInt(app.user.uid, 10)) {
pagination.loadPage(ajaxify.data.pagination.pageCount, scrollToPost);
}
}
@ -79,7 +79,7 @@ define('forum/topic/posts', [
}
function scrollToPostIfSelf(post) {
if (!config.scrollToMyPost) {
if (!ajaxify.data.scrollToMyPost) {
return;
}
var isSelfPost = parseInt(post.uid, 10) === parseInt(app.user.uid, 10);

@ -76,7 +76,7 @@ module.exports = function(User) {
settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1;
settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1;
settings.bootswatchSkin = settings.bootswatchSkin || 'default';
settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) ===1;
settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) != 0;
callback(null, settings);
});

Loading…
Cancel
Save