give Historical an emptyContent to make it look more consistent

and also to unbreak it since now !emptyContent get hidden

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-06-26 07:46:33 +01:00
parent fabdf22aad
commit 9b50daa748
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
2 changed files with 15 additions and 2 deletions

View file

@ -389,10 +389,16 @@ const RoomSubList = React.createClass({
</Droppable> : subListContent;
} else {
const Loader = sdk.getComponent("elements.Spinner");
if (this.props.showSpinner && !this.state.hidden) {
content = <Loader />;
} else if (this.state.hidden) {
content = undefined;
} // else show content calculated above
return (
<div className="mx_RoomSubList">
{this.props.alwaysShowHeader ? this._getHeaderJsx() : undefined}
{(this.props.showSpinner && !this.state.hidden) ? <Loader /> : undefined}
{ content }
</div>
);
}

View file

@ -705,6 +705,13 @@ module.exports = React.createClass({
onShowMoreRooms={self.onShowMoreRooms} />
<RoomSubList list={self.state.lists['im.vector.fake.archived']}
emptyContent={self.props.collapsed ? null :
<div className="mx_RoomList_emptySubListTip_container">
<div className="mx_RoomList_emptySubListTip">
{ _t('You have no historical rooms') }
</div>
</div>
}
label={_t('Historical')}
editable={false}
order="recent"
@ -712,7 +719,7 @@ module.exports = React.createClass({
alwaysShowHeader={true}
startAsHidden={true}
showSpinner={self.state.isLoadingLeftRooms}
onHeaderClick= {self.onArchivedHeaderClick}
onHeaderClick={self.onArchivedHeaderClick}
incomingCall={self.state.incomingCall}
searchFilter={self.props.searchFilter}
onShowMoreRooms={self.onShowMoreRooms} />