-
+ showNButton = (
+
+
{/* set by CSS masking */}
{showMoreText}
);
+ } else if (tiles.length <= nVisible) {
+ // we have all tiles visible - add a button to show less
+ let showLessText = (
+
+ {_t("Show less")}
+
+ );
+ if (this.props.isMinimized) showLessText = null;
+ showNButton = (
+
+
+ {/* set by CSS masking */}
+
+ {showLessText}
+
+ );
}
// Figure out if we need a handle
@@ -376,7 +398,7 @@ export default class RoomSublist2 extends React.Component {
// The padding is variable though, so figure out what we need padding for.
let padding = 0;
- if (showMoreButton) padding += showMoreHeight;
+ if (showNButton) padding += showMoreHeight;
if (handles.length > 0) padding += resizeHandleHeight;
const minTilesPx = layout.calculateTilesToPixelsMin(tiles.length, layout.minVisibleTiles, padding);
@@ -396,7 +418,7 @@ export default class RoomSublist2 extends React.Component {
className="mx_RoomSublist2_resizeBox"
>
{visibleTiles}
- {showMoreButton}
+ {showNButton}
)
}