mirror of https://github.com/vector-im/riot-web
remove unneeded else
parent
034883dc7e
commit
7e25e1b2fc
|
@ -1172,34 +1172,33 @@ const TimelinePanel = React.createClass({
|
||||||
// return the index of the first invisible event.
|
// return the index of the first invisible event.
|
||||||
if (isInView && adjacentInvisibleEventCount !== 0) {
|
if (isInView && adjacentInvisibleEventCount !== 0) {
|
||||||
return i + adjacentInvisibleEventCount;
|
return i + adjacentInvisibleEventCount;
|
||||||
} else {
|
}
|
||||||
if (node && !isInView) {
|
if (node && !isInView) {
|
||||||
// has node but not in view, so reset adjacent invisible events
|
// has node but not in view, so reset adjacent invisible events
|
||||||
adjacentInvisibleEventCount = 0;
|
adjacentInvisibleEventCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldIgnore = (ignoreEchoes && ev.status) || // local echo
|
const shouldIgnore = (ignoreEchoes && ev.status) || // local echo
|
||||||
(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 (allowEventsWithoutTiles && (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
|
||||||
// doesn't get messed up
|
// doesn't get messed up
|
||||||
if (!shouldIgnore || (shouldIgnore && adjacentInvisibleEventCount !== 0)) {
|
if (!shouldIgnore || (shouldIgnore && adjacentInvisibleEventCount !== 0)) {
|
||||||
++adjacentInvisibleEventCount;
|
++adjacentInvisibleEventCount;
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (shouldIgnore) {
|
if (shouldIgnore) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isInView) {
|
if (isInView) {
|
||||||
return i;
|
return i;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue