Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear thread panel event permalink when changing rooms #11024

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/stores/right-panel/RightPanelStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,18 @@
);
}
}
// when we're switching to a room, clear out thread permalinks to not get you stuck in the middle of the thread
// in order to fix https://github.com/matrix-org/matrix-react-sdk/pull/11011
if (this.currentCard?.phase === RightPanelPhases.ThreadView) {
this.currentCard.state.initialEvent = undefined;

Check failure on line 372 in src/stores/right-panel/RightPanelStore.ts

View workflow job for this annotation

GitHub Actions / Typescript Strict Error Checker

Object is possibly 'undefined'.

src/stores/right-panel/RightPanelStore.ts:372:13 - Object is possibly 'undefined'.
this.currentCard.state.isInitialEventHighlighted = undefined;

Check failure on line 373 in src/stores/right-panel/RightPanelStore.ts

View workflow job for this annotation

GitHub Actions / Typescript Strict Error Checker

Object is possibly 'undefined'.

src/stores/right-panel/RightPanelStore.ts:373:13 - Object is possibly 'undefined'.
this.currentCard.state.initialEventScrollIntoView = undefined;

Check failure on line 374 in src/stores/right-panel/RightPanelStore.ts

View workflow job for this annotation

GitHub Actions / Typescript Strict Error Checker

Object is possibly 'undefined'.

src/stores/right-panel/RightPanelStore.ts:374:13 - Object is possibly 'undefined'.
}

// If the right panel stays open mode is used, and the panel was either
// closed or never shown for that room, then force it open and display
// the room member list.
if (SettingsStore.getValue("feature_right_panel_default_open") && !this.byRoom[this.viewedRoomId]?.isOpen) {

Check failure on line 380 in src/stores/right-panel/RightPanelStore.ts

View workflow job for this annotation

GitHub Actions / Typescript Strict Error Checker

Type 'null' cannot be used as an index type.

src/stores/right-panel/RightPanelStore.ts:380:88 - Type 'null' cannot be used as an index type.

Check failure on line 380 in src/stores/right-panel/RightPanelStore.ts

View workflow job for this annotation

GitHub Actions / Typescript Strict Error Checker

Type 'undefined' cannot be used as an index type.

src/stores/right-panel/RightPanelStore.ts:380:88 - Type 'undefined' cannot be used as an index type.
const history = [{ phase: RightPanelPhases.RoomMemberList }];
const room = this.viewedRoomId ? this.mxClient?.getRoom(this.viewedRoomId) : undefined;
if (!room?.isSpaceRoom()) {
Expand Down
Loading