Fix show less button occluding the last tile
Fixes https://github.com/vector-im/riot-web/issues/14450 People may have to click various combinations of 'show more' and 'show less' until it fixes itself, as their layout could be a bit weird now.
This commit is contained in:
parent
d182961283
commit
a3a1e2e01f
1 changed files with 5 additions and 1 deletions
|
@ -624,11 +624,15 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
|||
const showMoreAtMinHeight = minTiles < this.numTiles;
|
||||
const minHeightPadding = RESIZE_HANDLE_HEIGHT + (showMoreAtMinHeight ? SHOW_N_BUTTON_HEIGHT : 0);
|
||||
const minTilesPx = layout.tilesToPixelsWithPadding(minTiles, minHeightPadding);
|
||||
const maxTilesPx = layout.tilesToPixelsWithPadding(this.numTiles, this.padding);
|
||||
let maxTilesPx = layout.tilesToPixelsWithPadding(this.numTiles, this.padding);
|
||||
const showMoreBtnClasses = classNames({
|
||||
'mx_RoomSublist2_showNButton': true,
|
||||
});
|
||||
|
||||
if (this.numTiles > this.layout.defaultVisibleTiles) {
|
||||
maxTilesPx += SHOW_N_BUTTON_HEIGHT;
|
||||
}
|
||||
|
||||
// If we're hiding rooms, show a 'show more' button to the user. This button
|
||||
// floats above the resize handle, if we have one present. If the user has all
|
||||
// tiles visible, it becomes 'show less'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue