mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: when using arrow to bottom fetch from newest (#22860)
We were attempting to fetch from last read but this is actually complicated to get right when you have a lot unread, as we might still have more to load after this but the last unread id is still the same and would make the user end up in a loop.
This commit is contained in:
parent
98e3bbd6bf
commit
891aabde19
@ -427,9 +427,8 @@ export default class ChatChannel extends Component {
|
|||||||
@action
|
@action
|
||||||
scrollToLatestMessage() {
|
scrollToLatestMessage() {
|
||||||
if (this.messagesLoader.canLoadMoreFuture) {
|
if (this.messagesLoader.canLoadMoreFuture) {
|
||||||
this.fetchMessages({ fetch_from_last_read: true });
|
this.fetchMessages();
|
||||||
} else if (this.messagesManager.messages.length > 0) {
|
} else if (this.messagesManager.messages.length > 0) {
|
||||||
this._ignoreNextScroll = true;
|
|
||||||
this.scrollToBottom(this.scrollable);
|
this.scrollToBottom(this.scrollable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user