You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Merge pull request #3688 from matrix-org/travis/rr-fix
Ensure read receipts end up with a valid reference to checkUnmounting
This commit is contained in:
@@ -693,6 +693,10 @@ export default class MessagePanel extends React.Component {
|
|||||||
|
|
||||||
const readReceipts = this._readReceiptsByEvent[eventId];
|
const readReceipts = this._readReceiptsByEvent[eventId];
|
||||||
|
|
||||||
|
// Dev note: `this._isUnmounting.bind(this)` is important - it ensures that
|
||||||
|
// the function is run in the context of this class and not EventTile, therefore
|
||||||
|
// ensuring the right `this._mounted` variable is used by read receipts (which
|
||||||
|
// don't update their position if we, the MessagePanel, is unmounting).
|
||||||
ret.push(
|
ret.push(
|
||||||
<li key={eventId}
|
<li key={eventId}
|
||||||
ref={this._collectEventNode.bind(this, eventId)}
|
ref={this._collectEventNode.bind(this, eventId)}
|
||||||
@@ -707,7 +711,7 @@ export default class MessagePanel extends React.Component {
|
|||||||
readReceipts={readReceipts}
|
readReceipts={readReceipts}
|
||||||
readReceiptMap={this._readReceiptMap}
|
readReceiptMap={this._readReceiptMap}
|
||||||
showUrlPreview={this.props.showUrlPreview}
|
showUrlPreview={this.props.showUrlPreview}
|
||||||
checkUnmounting={this._isUnmounting}
|
checkUnmounting={this._isUnmounting.bind(this)}
|
||||||
eventSendStatus={mxEv.getAssociatedStatus()}
|
eventSendStatus={mxEv.getAssociatedStatus()}
|
||||||
tileShape={this.props.tileShape}
|
tileShape={this.props.tileShape}
|
||||||
isTwelveHour={this.props.isTwelveHour}
|
isTwelveHour={this.props.isTwelveHour}
|
||||||
|
|||||||
Reference in New Issue
Block a user