mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
as both RM and RR move past invisible events, remove the flag
This commit is contained in:
parent
741ae9957b
commit
c94715150d
@ -658,7 +658,6 @@ const TimelinePanel = React.createClass({
|
||||
|
||||
const lastReadEventIndex = this._getLastDisplayedEventIndex({
|
||||
ignoreOwn: true,
|
||||
allowEventsWithoutTiles: true,
|
||||
});
|
||||
if (lastReadEventIndex === null) {
|
||||
shouldSendRR = false;
|
||||
@ -747,7 +746,6 @@ const TimelinePanel = React.createClass({
|
||||
const lastDisplayedIndex = this._getLastDisplayedEventIndex({
|
||||
allowPartial: true,
|
||||
ignoreEchoes: true,
|
||||
allowEventsWithoutTiles: true,
|
||||
});
|
||||
|
||||
if (lastDisplayedIndex === null) {
|
||||
@ -1132,7 +1130,6 @@ const TimelinePanel = React.createClass({
|
||||
const ignoreOwn = opts.ignoreOwn || false;
|
||||
const ignoreEchoes = opts.ignoreEchoes || false;
|
||||
const allowPartial = opts.allowPartial || false;
|
||||
const allowEventsWithoutTiles = opts.allowEventsWithoutTiles || false;
|
||||
|
||||
const messagePanel = this.refs.messagePanel;
|
||||
if (messagePanel === undefined) return null;
|
||||
@ -1153,8 +1150,7 @@ const TimelinePanel = React.createClass({
|
||||
return false;
|
||||
};
|
||||
|
||||
// if allowEventsWithoutTiles is enabled, we keep track
|
||||
// of how many of the adjacent events didn't have a tile
|
||||
// We keep track of how many of the adjacent events didn't have a tile
|
||||
// but should have the read receipt moved past them, so
|
||||
// we can include those once we find the last displayed (visible) event.
|
||||
// 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
|
||||
const isWithoutTile = !EventTile.haveTileForEvent(ev) || shouldHideEvent(ev);
|
||||
|
||||
if (allowEventsWithoutTiles && (isWithoutTile || !node)) {
|
||||
if (isWithoutTile || !node) {
|
||||
// don't start counting if the event should be ignored,
|
||||
// but continue counting if we were already so the offset
|
||||
// to the previous invisble event that didn't need to be ignored
|
||||
|
Loading…
Reference in New Issue
Block a user