mirror of https://github.com/vector-im/riot-web
Merge pull request #5692 from SimonBrandner/scroll-to-bottom-setting
Add a scroll to bottom on message sent settingpull/21833/head
commit
c7d4dfa4f5
|
@ -404,7 +404,9 @@ export default class SendMessageComposer extends React.Component {
|
||||||
this._editorRef.clearUndoHistory();
|
this._editorRef.clearUndoHistory();
|
||||||
this._editorRef.focus();
|
this._editorRef.focus();
|
||||||
this._clearStoredEditorState();
|
this._clearStoredEditorState();
|
||||||
dis.dispatch({action: "scroll_to_bottom"});
|
if (SettingsStore.getValue("scrollToBottomOnMessageSent")) {
|
||||||
|
dis.dispatch({action: "scroll_to_bottom"});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
|
@ -48,6 +48,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
||||||
'showRedactions',
|
'showRedactions',
|
||||||
'enableSyntaxHighlightLanguageDetection',
|
'enableSyntaxHighlightLanguageDetection',
|
||||||
'expandCodeByDefault',
|
'expandCodeByDefault',
|
||||||
|
'scrollToBottomOnMessageSent',
|
||||||
'showCodeLineNumbers',
|
'showCodeLineNumbers',
|
||||||
'showJoinLeaves',
|
'showJoinLeaves',
|
||||||
'showAvatarChanges',
|
'showAvatarChanges',
|
||||||
|
|
|
@ -809,6 +809,7 @@
|
||||||
"Enable automatic language detection for syntax highlighting": "Enable automatic language detection for syntax highlighting",
|
"Enable automatic language detection for syntax highlighting": "Enable automatic language detection for syntax highlighting",
|
||||||
"Expand code blocks by default": "Expand code blocks by default",
|
"Expand code blocks by default": "Expand code blocks by default",
|
||||||
"Show line numbers in code blocks": "Show line numbers in code blocks",
|
"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",
|
"Show avatars in user and room mentions": "Show avatars in user and room mentions",
|
||||||
"Enable big emoji in chat": "Enable big emoji in chat",
|
"Enable big emoji in chat": "Enable big emoji in chat",
|
||||||
"Send typing notifications": "Send typing notifications",
|
"Send typing notifications": "Send typing notifications",
|
||||||
|
|
|
@ -330,6 +330,11 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
displayName: _td('Show line numbers in code blocks'),
|
displayName: _td('Show line numbers in code blocks'),
|
||||||
default: true,
|
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": {
|
"Pill.shouldShowPillAvatar": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td('Show avatars in user and room mentions'),
|
displayName: _td('Show avatars in user and room mentions'),
|
||||||
|
|
Loading…
Reference in New Issue