mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
Add setting to avoid showing a post after it is submitted to keep the user's place on the page to address issue #4363
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user