From c8381021b823dcd71c0e057756231daec8185306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=95=20Tim?= Date: Sun, 28 Jun 2020 04:08:06 +0800 Subject: [PATCH] Hide room list show less button if it would do nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ☕ Tim 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#14219 --- 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 79efa565b7..d34ddf090d 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -393,7 +393,7 @@ export default class RoomSublist2 extends React.Component { {showMoreText} ); - } 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 = (