Merge pull request #3688 from matrix-org/travis/rr-fix
Ensure read receipts end up with a valid reference to checkUnmountingpull/21833/head
commit
1c766d8594
|
@ -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}
|
||||||
|
|
Loading…
Reference in New Issue