mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: scroll to bottom when message is staged (#21408)
Since our recent change of inverting thread scrolling direction it feels more responsive to scroll down in thread panel as soon as message is staged and not after it's actually persisted.
This commit is contained in:
parent
e88b997153
commit
78616404ce
@ -190,6 +190,8 @@ export default class ChatThreadPanel extends Component {
|
||||
this.resetComposer();
|
||||
this.thread.messagesManager.addMessages([stagedMessage]);
|
||||
|
||||
this.scrollToBottom();
|
||||
|
||||
return this.chatApi
|
||||
.sendMessage(this.channel.id, {
|
||||
message: stagedMessage.message,
|
||||
@ -199,9 +201,6 @@ export default class ChatThreadPanel extends Component {
|
||||
thread_id: this.thread.staged ? null : stagedMessage.thread.id,
|
||||
staged_thread_id: this.thread.staged ? stagedMessage.thread.id : null,
|
||||
})
|
||||
.then(() => {
|
||||
this.scrollToBottom();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.#onSendError(stagedMessage.id, error);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user