Merge pull request #4785 from matrix-org/travis/room-list/show-less-is-more

Don't show a 'show less' button when it's impossible to collapse
pull/21833/head
Travis Ralston 2020-06-18 07:46:32 -06:00 committed by GitHub
commit 4a5cc8557c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
{showMoreText} {showMoreText}
</div> </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 // we have all tiles visible - add a button to show less
let showLessText = ( let showLessText = (
<span className='mx_RoomSublist2_showNButtonText'> <span className='mx_RoomSublist2_showNButtonText'>