Add setting to avoid showing a post after it is submitted to keep the user's place on the page to address issue #4363

v1.18.x
boomzillawtf 9 years ago
parent c8b179e492
commit ceb3b6ebe7

@ -103,6 +103,8 @@
"enable_topic_searching": "Enable In-Topic Searching",
"topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen",
"scroll_to_my_post": "After posting a reply, show the new post",
"follow_topics_you_reply_to": "Follow topics that you reply to",
"follow_topics_you_create": "Follow topics you create",

@ -79,7 +79,7 @@ define('forum/topic/posts', [
}
function scrollToPostIfSelf(post) {
var isSelfPost = parseInt(post.uid, 10) === parseInt(app.user.uid, 10);
var isSelfPost = config.scrollToMyPost && parseInt(post.uid, 10) === parseInt(app.user.uid, 10);
if (isSelfPost) {
navigator.scrollBottom(post.index);
}

@ -76,6 +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;
callback(null, settings);
});
@ -120,7 +121,8 @@ module.exports = function(User) {
restrictChat: data.restrictChat,
topicSearchEnabled: data.topicSearchEnabled,
groupTitle: data.groupTitle,
homePageRoute: data.homePageCustom || data.homePageRoute
homePageRoute: data.homePageCustom || data.homePageRoute,
scrollToMyPost: data.scrollToMyPost
};
if (data.bootswatchSkin) {

Loading…
Cancel
Save