Fix timeline scrolling when sending threads (#6974)

Fix https://github.com/vector-im/element-web/issues/19412
This commit is contained in:
Dariusz Niemczyk 2021-10-18 21:50:06 +02:00 committed by GitHub
parent 98ba3fd6e6
commit f8b6f13105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -841,7 +841,9 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
}
case "scroll_to_bottom":
this.messagePanel?.jumpToLiveTimeline();
if (payload.timelineRenderingType === this.context.timelineRenderingType) {
this.messagePanel?.jumpToLiveTimeline();
}
break;
}
};

View file

@ -502,7 +502,10 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
this.editorRef.current?.focus();
this.clearStoredEditorState();
if (SettingsStore.getValue("scrollToBottomOnMessageSent")) {
dis.dispatch({ action: "scroll_to_bottom" });
dis.dispatch({
action: "scroll_to_bottom",
timelineRenderingType: this.context.timelineRenderingType,
});
}
}