Only insert ELS if it'll be non-empty
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
5c960dccb7
commit
6be318b59d
1 changed files with 13 additions and 15 deletions
|
@ -428,7 +428,7 @@ module.exports = createReactClass({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If RM event is in the summary mark it as such and the RM will be appended after the summary.
|
// If RM event is in the summary, mark it as such and the RM will be appended after the summary.
|
||||||
if (collapsedMxEv.getId() === this.props.readMarkerEventId) {
|
if (collapsedMxEv.getId() === this.props.readMarkerEventId) {
|
||||||
readMarkerInSummary = true;
|
readMarkerInSummary = true;
|
||||||
}
|
}
|
||||||
|
@ -445,22 +445,20 @@ module.exports = createReactClass({
|
||||||
return this._getTilesForEvent(e, e, e === lastShownEvent);
|
return this._getTilesForEvent(e, e, e === lastShownEvent);
|
||||||
}).reduce((a, b) => a.concat(b));
|
}).reduce((a, b) => a.concat(b));
|
||||||
|
|
||||||
if (eventTiles.length === 0) {
|
if (eventTiles.length > 0) {
|
||||||
eventTiles = null;
|
ret.push(<EventListSummary
|
||||||
|
key="roomcreationsummary"
|
||||||
|
events={summarisedEvents}
|
||||||
|
onToggle={this._onHeightChanged} // Update scroll state
|
||||||
|
summaryMembers={[mxEv.sender]}
|
||||||
|
summaryText={_t("%(creator)s created and configured the room.", {
|
||||||
|
creator: mxEv.sender ? mxEv.sender.name : mxEv.getSender(),
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{ eventTiles }
|
||||||
|
</EventListSummary>);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.push(<EventListSummary
|
|
||||||
key="roomcreationsummary"
|
|
||||||
events={summarisedEvents}
|
|
||||||
onToggle={this._onHeightChanged} // Update scroll state
|
|
||||||
summaryMembers={[mxEv.sender]}
|
|
||||||
summaryText={_t("%(creator)s created and configured the room.", {
|
|
||||||
creator: mxEv.sender ? mxEv.sender.name : mxEv.getSender(),
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{ eventTiles }
|
|
||||||
</EventListSummary>);
|
|
||||||
|
|
||||||
if (readMarkerInSummary) {
|
if (readMarkerInSummary) {
|
||||||
ret.push(this._getReadMarkerTile(visible));
|
ret.push(this._getReadMarkerTile(visible));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue