Allow thread panel to be closed after being opened from notification (#9937)

* Allow thread panel to be closed after being opened from notification
* Add test to ensure the behavior is correct
This commit is contained in:
Janne Mareike Koschinski 2023-01-23 14:35:44 +01:00 committed by GitHub
parent 056fec844f
commit a0a419a3b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 7 deletions

View file

@ -1,5 +1,5 @@
/*
Copyright 2021 - 2022 The Matrix.org Foundation C.I.C.
Copyright 2021 - 2023 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -123,7 +123,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
SettingsStore.unwatchSetting(this.layoutWatcherRef);
const hasRoomChanged = SdkContextClass.instance.roomViewStore.getRoomId() !== roomId;
if (this.props.isInitialEventHighlighted && !hasRoomChanged) {
if (this.props.initialEvent && !hasRoomChanged) {
dis.dispatch<ViewRoomPayload>({
action: Action.ViewRoom,
room_id: this.props.room.roomId,