Fix issue with thread notification state ignoring initial events (#8417)

pull/28217/head
Michael Telatynski 2022-04-29 09:48:57 +01:00 committed by GitHub
parent 565488a10a
commit fddbc429a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -991,9 +991,7 @@ export class UnwrappedEventTile extends React.Component<IProps, IState> {
mx_EventTile_12hr: this.props.isTwelveHour, mx_EventTile_12hr: this.props.isTwelveHour,
// Note: we keep the `sending` state class for tests, not for our styles // Note: we keep the `sending` state class for tests, not for our styles
mx_EventTile_sending: !isEditing && isSending, mx_EventTile_sending: !isEditing && isSending,
mx_EventTile_highlight: (this.context.timelineRenderingType === TimelineRenderingType.Notification mx_EventTile_highlight: this.shouldHighlight(),
? false
: this.shouldHighlight()),
mx_EventTile_selected: this.props.isSelectedEvent || this.state.contextMenu, mx_EventTile_selected: this.props.isSelectedEvent || this.state.contextMenu,
mx_EventTile_continuation: isContinuation || eventType === EventType.CallInvite, mx_EventTile_continuation: isContinuation || eventType === EventType.CallInvite,
mx_EventTile_last: this.props.last, mx_EventTile_last: this.props.last,

View File

@ -31,6 +31,10 @@ export class ThreadNotificationState extends NotificationState implements IDestr
super(); super();
this.thread.on(ThreadEvent.NewReply, this.handleNewThreadReply); this.thread.on(ThreadEvent.NewReply, this.handleNewThreadReply);
this.thread.on(ThreadEvent.ViewThread, this.resetThreadNotification); this.thread.on(ThreadEvent.ViewThread, this.resetThreadNotification);
if (this.thread.replyToEvent) {
// Process the current tip event
this.handleNewThreadReply(this.thread, this.thread.replyToEvent);
}
} }
public destroy(): void { public destroy(): void {