Right panel store refactor (#7313)

Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
Timo 2022-01-05 16:14:44 +01:00 committed by GitHub
parent 8e881336ab
commit 325e2ba99b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 765 additions and 811 deletions

View file

@ -55,7 +55,7 @@ interface IState {
editState?: EditorStateTransfer;
replyToEvent?: MatrixEvent;
initialEventId?: string;
initialEventHighlighted?: boolean;
isInitialEventHighlighted?: boolean;
// settings:
showReadReceipts?: boolean;
@ -103,7 +103,7 @@ export default class TimelineCard extends React.Component<IProps, IState> {
// roomLoadError: RoomViewStore.getRoomLoadError(),
initialEventId: RoomViewStore.getInitialEventId(),
initialEventHighlighted: RoomViewStore.isInitialEventHighlighted(),
isInitialEventHighlighted: RoomViewStore.isInitialEventHighlighted(),
replyToEvent: RoomViewStore.getQuotingEvent(),
};
@ -127,7 +127,7 @@ export default class TimelineCard extends React.Component<IProps, IState> {
};
private onScroll = (): void => {
if (this.state.initialEventId && this.state.initialEventHighlighted) {
if (this.state.initialEventId && this.state.isInitialEventHighlighted) {
dis.dispatch({
action: Action.ViewRoom,
room_id: this.props.room.roomId,
@ -145,7 +145,7 @@ export default class TimelineCard extends React.Component<IProps, IState> {
};
public render(): JSX.Element {
const highlightedEventId = this.state.initialEventHighlighted
const highlightedEventId = this.state.isInitialEventHighlighted
? this.state.initialEventId
: null;