mirror of https://github.com/vector-im/riot-web
Removed logs, updated phrasing on 'others joined'
Now it's: 1 user joined and left >1 others joined and leftpull/21833/head
parent
5f0b891d47
commit
f5bc8d1fe0
|
@ -185,8 +185,6 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
let fewEvents = eventsToRender.length < this.props.threshold;
|
let fewEvents = eventsToRender.length < this.props.threshold;
|
||||||
console.log(eventsToRender.length, joinEvents.length, leaveEvents.length, this.state.expanded, fewEvents);
|
|
||||||
|
|
||||||
let expanded = this.state.expanded || fewEvents;
|
let expanded = this.state.expanded || fewEvents;
|
||||||
let expandedEvents = null;
|
let expandedEvents = null;
|
||||||
|
|
||||||
|
@ -204,6 +202,8 @@ module.exports = React.createClass({
|
||||||
<a onClick={this.toggleSummary} href="javascript:;">{expanded?'collapse':'expand'}</a>
|
<a onClick={this.toggleSummary} href="javascript:;">{expanded?'collapse':'expand'}</a>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let noun = (joinAndLeft === 1 ? 'user' : 'others');
|
||||||
|
|
||||||
summaryContainer = (
|
summaryContainer = (
|
||||||
<div className="mx_EventTile_line">
|
<div className="mx_EventTile_line">
|
||||||
<div className="mx_EventTile_info">
|
<div className="mx_EventTile_info">
|
||||||
|
@ -211,7 +211,7 @@ module.exports = React.createClass({
|
||||||
{avatars}
|
{avatars}
|
||||||
</span>
|
</span>
|
||||||
<span className="mx_TextualEvent mx_MemberEventListSummary_summary">
|
<span className="mx_TextualEvent mx_MemberEventListSummary_summary">
|
||||||
{summary}{joinAndLeft? '. ' + joinAndLeft + ' others joined and left' : ''}
|
{summary}{joinAndLeft? '. ' + joinAndLeft + ' ' + noun + ' joined and left' : ''}
|
||||||
</span>
|
</span>
|
||||||
{toggleButton}
|
{toggleButton}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue