Sent -> Event

This commit is contained in:
Luke Barnard 2017-05-11 09:20:34 +01:00
parent 856ef58d46
commit 3815ad6cd0

View file

@ -177,7 +177,7 @@ var TimelinePanel = React.createClass({
componentWillMount: function() { componentWillMount: function() {
debuglog("TimelinePanel: mounting"); debuglog("TimelinePanel: mounting");
this.lastRRSentSentId = undefined; this.lastRRSentEventId = undefined;
this.lastRMSentEventId = undefined; this.lastRMSentEventId = undefined;
this.dispatcherRef = dis.register(this.onAction); this.dispatcherRef = dis.register(this.onAction);
@ -541,7 +541,7 @@ var TimelinePanel = React.createClass({
// the current RR event. // the current RR event.
lastReadEventIndex > currentReadUpToEventIndex && lastReadEventIndex > currentReadUpToEventIndex &&
// Only send a RR if the last RR set != the one we would send // Only send a RR if the last RR set != the one we would send
this.lastRRSentSentId != lastReadEvent.getId(); this.lastRRSentEventId != lastReadEvent.getId();
// Only send a RM if the last RM sent != the one we would send // Only send a RM if the last RM sent != the one we would send
const shouldSendReadMarker = const shouldSendReadMarker =
@ -551,7 +551,7 @@ var TimelinePanel = React.createClass({
// same one at the server repeatedly // same one at the server repeatedly
if (shouldSendReadReceipt || shouldSendReadMarker) { if (shouldSendReadReceipt || shouldSendReadMarker) {
if (shouldSendReadReceipt) { if (shouldSendReadReceipt) {
this.lastRRSentSentId = lastReadEvent.getId(); this.lastRRSentEventId = lastReadEvent.getId();
} else { } else {
lastReadEvent = null; lastReadEvent = null;
} }
@ -572,11 +572,11 @@ var TimelinePanel = React.createClass({
return MatrixClientPeg.get().sendReadReceipt( return MatrixClientPeg.get().sendReadReceipt(
lastReadEvent, lastReadEvent,
).catch(() => { ).catch(() => {
this.lastRRSentSentId = undefined; this.lastRRSentEventId = undefined;
}); });
} }
// it failed, so allow retries next time the user is active // it failed, so allow retries next time the user is active
this.lastRRSentSentId = undefined; this.lastRRSentEventId = undefined;
this.lastRMSentEventId = undefined; this.lastRMSentEventId = undefined;
}); });