Hide room list show less button if it would do nothing
Signed-off-by: ☕ Tim <tim@wants.coffee> On the new rooms list, if the show less button wouldn't result in a smaller list, don't show it. Fixes vector-im/riot-web#14219pull/21833/head
parent
5172c7b205
commit
c8381021b8
|
@ -393,7 +393,7 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
|||
{showMoreText}
|
||||
</div>
|
||||
);
|
||||
} else if (tiles.length <= nVisible && tiles.length > this.props.layout.minVisibleTiles) {
|
||||
} else if (tiles.length <= nVisible && tiles.length > this.props.layout.defaultVisibleTiles) {
|
||||
// we have all tiles visible - add a button to show less
|
||||
let showLessText = (
|
||||
<span className='mx_RoomSublist2_showNButtonText'>
|
||||
|
|
Loading…
Reference in New Issue