FIX: removes stored scroll position in drawer (#20328)

This commit is contained in:
Joffrey JAFFEUX 2023-02-16 12:58:47 +01:00 committed by GitHub
parent 5720bb7b64
commit 7cc0c59469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,12 +84,20 @@ export default class ChannelsList extends Component {
@action
storeScrollPosition() {
if (this.chatStateManager.isDrawerActive) {
return;
}
const scrollTop = document.querySelector(".channels-list")?.scrollTop || 0;
this.session.channelsListPosition = scrollTop;
}
@bind
_applyScrollPosition() {
if (this.chatStateManager.isDrawerActive) {
return;
}
const position = this.chatStateManager.isFullPageActive
? this.session.channelsListPosition || 0
: 0;