From 1735da8cb13a110c2caf1b62542b095acb65c76b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 17 Jun 2020 22:04:34 -0600 Subject: [PATCH] Don't show a 'show less' button when it's impossible to collapse Fixes https://github.com/vector-im/riot-web/issues/14076 --- src/components/views/rooms/RoomSublist2.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index c72e74a1be..94e0e06c00 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -359,7 +359,7 @@ export default class RoomSublist2 extends React.Component { {showMoreText} ); - } 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 = (