You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
Conform more of the codebase to strictNullChecks (#10731)
This commit is contained in:
committed by
GitHub
parent
9f8113eabd
commit
1281c0746b
@@ -308,7 +308,11 @@ export default class MessagePanel extends React.Component<IProps, IState> {
|
||||
this.calculateRoomMembersCount();
|
||||
}
|
||||
|
||||
if (prevProps.readMarkerVisible && this.props.readMarkerEventId !== prevProps.readMarkerEventId) {
|
||||
if (
|
||||
prevProps.readMarkerVisible &&
|
||||
prevProps.readMarkerEventId &&
|
||||
this.props.readMarkerEventId !== prevProps.readMarkerEventId
|
||||
) {
|
||||
const ghostReadMarkers = this.state.ghostReadMarkers;
|
||||
ghostReadMarkers.push(prevProps.readMarkerEventId);
|
||||
this.setState({
|
||||
@@ -906,7 +910,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
|
||||
if (receiptsByUserId.get(userId)) {
|
||||
continue;
|
||||
}
|
||||
const { lastShownEventId, receipt } = this.readReceiptsByUserId.get(userId);
|
||||
const { lastShownEventId, receipt } = this.readReceiptsByUserId.get(userId)!;
|
||||
const existingReceipts = receiptsByEvent.get(lastShownEventId) || [];
|
||||
receiptsByEvent.set(lastShownEventId, existingReceipts.concat(receipt));
|
||||
receiptsByUserId.set(userId, { lastShownEventId, receipt });
|
||||
|
||||
Reference in New Issue
Block a user