Don't show a 'show less' button when it's impossible to collapse

Fixes https://github.com/vector-im/riot-web/issues/14076
pull/21833/head
Travis Ralston 2020-06-17 22:04:34 -06:00
parent 803b7bb30f
commit 1735da8cb1
1 changed files with 1 additions and 1 deletions

View File

@ -359,7 +359,7 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
{showMoreText}
</div>
);
} else if (tiles.length <= nVisible) {
} else if (tiles.length <= nVisible && tiles.length > this.props.layout.minVisibleTiles) {
// we have all tiles visible - add a button to show less
let showLessText = (
<span className='mx_RoomSublist2_showNButtonText'>