as both RM and RR move past invisible events, remove the flag

pull/21833/head
Bruno Windels 2019-07-17 10:18:51 +02:00
parent 741ae9957b
commit c94715150d
1 changed files with 2 additions and 6 deletions

View File

@ -658,7 +658,6 @@ const TimelinePanel = React.createClass({
const lastReadEventIndex = this._getLastDisplayedEventIndex({ const lastReadEventIndex = this._getLastDisplayedEventIndex({
ignoreOwn: true, ignoreOwn: true,
allowEventsWithoutTiles: true,
}); });
if (lastReadEventIndex === null) { if (lastReadEventIndex === null) {
shouldSendRR = false; shouldSendRR = false;
@ -747,7 +746,6 @@ const TimelinePanel = React.createClass({
const lastDisplayedIndex = this._getLastDisplayedEventIndex({ const lastDisplayedIndex = this._getLastDisplayedEventIndex({
allowPartial: true, allowPartial: true,
ignoreEchoes: true, ignoreEchoes: true,
allowEventsWithoutTiles: true,
}); });
if (lastDisplayedIndex === null) { if (lastDisplayedIndex === null) {
@ -1132,7 +1130,6 @@ const TimelinePanel = React.createClass({
const ignoreOwn = opts.ignoreOwn || false; const ignoreOwn = opts.ignoreOwn || false;
const ignoreEchoes = opts.ignoreEchoes || false; const ignoreEchoes = opts.ignoreEchoes || false;
const allowPartial = opts.allowPartial || false; const allowPartial = opts.allowPartial || false;
const allowEventsWithoutTiles = opts.allowEventsWithoutTiles || false;
const messagePanel = this.refs.messagePanel; const messagePanel = this.refs.messagePanel;
if (messagePanel === undefined) return null; if (messagePanel === undefined) return null;
@ -1153,8 +1150,7 @@ const TimelinePanel = React.createClass({
return false; return false;
}; };
// if allowEventsWithoutTiles is enabled, we keep track // We keep track of how many of the adjacent events didn't have a tile
// of how many of the adjacent events didn't have a tile
// but should have the read receipt moved past them, so // but should have the read receipt moved past them, so
// we can include those once we find the last displayed (visible) event. // we can include those once we find the last displayed (visible) event.
// The counter is not started for events we don't want // The counter is not started for events we don't want
@ -1183,7 +1179,7 @@ const TimelinePanel = React.createClass({
(ignoreOwn && ev.sender && ev.sender.userId == myUserId); // own message (ignoreOwn && ev.sender && ev.sender.userId == myUserId); // own message
const isWithoutTile = !EventTile.haveTileForEvent(ev) || shouldHideEvent(ev); const isWithoutTile = !EventTile.haveTileForEvent(ev) || shouldHideEvent(ev);
if (allowEventsWithoutTiles && (isWithoutTile || !node)) { if (isWithoutTile || !node) {
// don't start counting if the event should be ignored, // don't start counting if the event should be ignored,
// but continue counting if we were already so the offset // but continue counting if we were already so the offset
// to the previous invisble event that didn't need to be ignored // to the previous invisble event that didn't need to be ignored