don't scroll sub list header

This commit is contained in:
Bruno Windels 2018-10-18 16:25:22 +02:00
parent 0b615b21e2
commit d264687796
4 changed files with 25 additions and 23 deletions

View file

@ -362,12 +362,22 @@ const RoomSubList = React.createClass({
}
}
if (this.state.sortedList.length > 0 || this.props.extraTiles.length > 0) {
const subList = this.state.hidden ? undefined : content;
return <div className={"mx_RoomSubList"}>
{this._getHeaderJsx()}
{subList}
</div>;
const len = this.state.sortedList.length + this.props.extraTiles.length;
if (len) {
if (this.state.hidden) {
return <div className={["mx_RoomSubList", "mx_RoomSubList_hidden"]}>
{this._getHeaderJsx()}
</div>;
} else {
const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper");
return <div className={"mx_RoomSubList"} style={{flexGrow: len}}>
{this._getHeaderJsx()}
<GeminiScrollbarWrapper>
{ content }
</GeminiScrollbarWrapper>
</div>;
}
} else {
const Loader = sdk.getComponent("elements.Spinner");
if (this.props.showSpinner) {