mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 19:26:04 +03:00
Merge pull request #5692 from SimonBrandner/scroll-to-bottom-setting
Add a scroll to bottom on message sent setting
This commit is contained in:
commit
c7d4dfa4f5
4 changed files with 10 additions and 1 deletions
|
@ -404,7 +404,9 @@ export default class SendMessageComposer extends React.Component {
|
|||
this._editorRef.clearUndoHistory();
|
||||
this._editorRef.focus();
|
||||
this._clearStoredEditorState();
|
||||
dis.dispatch({action: "scroll_to_bottom"});
|
||||
if (SettingsStore.getValue("scrollToBottomOnMessageSent")) {
|
||||
dis.dispatch({action: "scroll_to_bottom"});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
@ -48,6 +48,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
|||
'showRedactions',
|
||||
'enableSyntaxHighlightLanguageDetection',
|
||||
'expandCodeByDefault',
|
||||
'scrollToBottomOnMessageSent',
|
||||
'showCodeLineNumbers',
|
||||
'showJoinLeaves',
|
||||
'showAvatarChanges',
|
||||
|
|
|
@ -809,6 +809,7 @@
|
|||
"Enable automatic language detection for syntax highlighting": "Enable automatic language detection for syntax highlighting",
|
||||
"Expand code blocks by default": "Expand code blocks by default",
|
||||
"Show line numbers in code blocks": "Show line numbers in code blocks",
|
||||
"Jump to the bottom of the timeline when you send a message": "Jump to the bottom of the timeline when you send a message",
|
||||
"Show avatars in user and room mentions": "Show avatars in user and room mentions",
|
||||
"Enable big emoji in chat": "Enable big emoji in chat",
|
||||
"Send typing notifications": "Send typing notifications",
|
||||
|
|
|
@ -330,6 +330,11 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
|||
displayName: _td('Show line numbers in code blocks'),
|
||||
default: true,
|
||||
},
|
||||
"scrollToBottomOnMessageSent": {
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
displayName: _td('Jump to the bottom of the timeline when you send a message'),
|
||||
default: true,
|
||||
},
|
||||
"Pill.shouldShowPillAvatar": {
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
displayName: _td('Show avatars in user and room mentions'),
|
||||
|
|
Loading…
Reference in a new issue