Skip to content

Commit c838102

Browse files
committed
Hide room list show less button if it would do nothing
Signed-off-by: ☕ Tim <[email protected]> On the new rooms list, if the show less button wouldn't result in a smaller list, don't show it. Fixes element-hq/element-web#14219
1 parent 5172c7b commit c838102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/views/rooms/RoomSublist2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
393393
{showMoreText}
394394
</div>
395395
);
396-
} else if (tiles.length <= nVisible && tiles.length > this.props.layout.minVisibleTiles) {
396+
} else if (tiles.length <= nVisible && tiles.length > this.props.layout.defaultVisibleTiles) {
397397
// we have all tiles visible - add a button to show less
398398
let showLessText = (
399399
<span className='mx_RoomSublist2_showNButtonText'>

0 commit comments

Comments
 (0)