Propertly thread showHiddenEventsInTimeline through groupers

This commit is contained in:
Robin Townsend 2021-06-17 09:52:15 -04:00 committed by GitHub
parent 9e2ab0d432
commit e4250e254c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -537,7 +537,7 @@ export default class MessagePanel extends React.Component {
if (grouper) { if (grouper) {
if (grouper.shouldGroup(mxEv)) { if (grouper.shouldGroup(mxEv)) {
grouper.add(mxEv); grouper.add(mxEv, this.context?.showHiddenEventsInTimeline);
continue; continue;
} else { } else {
// not part of group, so get the group tiles, close the // not part of group, so get the group tiles, close the
@ -1167,10 +1167,10 @@ class MemberGrouper {
return isMembershipChange(ev); return isMembershipChange(ev);
} }
add(ev) { add(ev, showHiddenEvents) {
if (ev.getType() === 'm.room.member') { if (ev.getType() === 'm.room.member') {
// We can ignore any events that don't actually have a message to display // We can ignore any events that don't actually have a message to display
if (!hasText(ev, this.context?.showHiddenEventsInTimeline)) return; if (!hasText(ev, showHiddenEvents)) return;
} }
this.readMarker = this.readMarker || this.panel._readMarkerForEvent( this.readMarker = this.readMarker || this.panel._readMarkerForEvent(
ev.getId(), ev.getId(),