Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Consider continuations when resolving whether a tile is last in secti…
Browse files Browse the repository at this point in the history
…on (#7461)
  • Loading branch information
t3chguy committed Jan 10, 2022
1 parent fbfd2c3 commit 8f60d8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/structures/MessagePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -727,12 +727,14 @@ export default class MessagePanel extends React.Component<IProps, IState> {
ret.push(dateSeparator);
}

let willWantDateSeparator = false;
let lastInSection = true;
if (nextEventWithTile) {
willWantDateSeparator = this.wantsDateSeparator(mxEv, nextEventWithTile.getDate() || new Date());
lastInSection = willWantDateSeparator || mxEv.getSender() !== nextEventWithTile.getSender() ||
getEventDisplayInfo(nextEventWithTile).isInfoMessage;
const nextEv = nextEventWithTile;
const willWantDateSeparator = this.wantsDateSeparator(mxEv, nextEv.getDate() || new Date());
lastInSection = willWantDateSeparator ||
mxEv.getSender() !== nextEv.getSender() ||
getEventDisplayInfo(nextEv).isInfoMessage ||
!shouldFormContinuation(mxEv, nextEv, this.showHiddenEvents, this.context.timelineRenderingType);
}

// is this a continuation of the previous message?
Expand Down

0 comments on commit 8f60d8d

Please sign in to comment.