From 32f737e1ba6e442974067c058dd192785e526d00 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 10 Mar 2021 13:45:37 +0000 Subject: [PATCH] Tweak sent marker code style --- src/components/structures/MessagePanel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index b0705b5878..f8bf554cb3 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -614,10 +614,12 @@ export default class MessagePanel extends React.Component { // This is a bit nuanced, but if our next event is hidden but a future event is not // hidden then we're not the last successful. - if (nextEventWithTile) { // avoid length limit by wrapping in an if - if (isSentState(nextEventWithTile.getAssociatedStatus()) && nextEventWithTile !== nextEvent) { - isLastSuccessful = false; - } + if ( + nextEventWithTile && + nextEventWithTile !== nextEvent && + isSentState(nextEventWithTile.getAssociatedStatus()) + ) { + isLastSuccessful = false; } // We only want to consider "last successful" if the event is sent by us, otherwise of course