From 9b50daa7486ac95b700c579fd973b048b6838f47 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 26 Jun 2018 07:46:33 +0100 Subject: [PATCH] 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> --- src/components/structures/RoomSubList.js | 8 +++++++- src/components/views/rooms/RoomList.js | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 0b6f7eaa45..bd09241ce0 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -389,10 +389,16 @@ const RoomSubList = React.createClass({ : subListContent; } else { const Loader = sdk.getComponent("elements.Spinner"); + if (this.props.showSpinner && !this.state.hidden) { + content = ; + } else if (this.state.hidden) { + content = undefined; + } // else show content calculated above + return (
{this.props.alwaysShowHeader ? this._getHeaderJsx() : undefined} - {(this.props.showSpinner && !this.state.hidden) ? : undefined} + { content }
); } diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 167603ecfb..896c09fe4e 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -705,6 +705,13 @@ module.exports = React.createClass({ onShowMoreRooms={self.onShowMoreRooms} /> +
+ { _t('You have no historical rooms') } +
+ + } 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} />