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 (#10738)
This commit is contained in:
committed by
GitHub
parent
5e8488c283
commit
52017f62e1
@@ -1023,7 +1023,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
shouldSendRR &&
|
||||
// Only send a RR if the last read event is ahead in the timeline relative to
|
||||
// the current RR event.
|
||||
lastReadEventIndex > currentRREventIndex &&
|
||||
lastReadEventIndex! > currentRREventIndex! &&
|
||||
// Only send a RR if the last RR set != the one we would send
|
||||
this.lastRRSentEventId !== lastReadEvent?.getId();
|
||||
|
||||
@@ -1307,7 +1307,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
const pos = this.getReadMarkerPosition();
|
||||
const ret =
|
||||
this.state.readMarkerEventId !== null && // 1.
|
||||
(pos < 0 || pos === null); // 3., 4.
|
||||
(pos === null || pos < 0); // 3., 4.
|
||||
return ret;
|
||||
};
|
||||
|
||||
@@ -1351,7 +1351,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
||||
"TimelinePanel scrolling to eventId " +
|
||||
eventId +
|
||||
" at position " +
|
||||
offsetBase * 100 +
|
||||
offsetBase! * 100 +
|
||||
"% + " +
|
||||
pixelOffset,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user