Initial experiments with resizing of room lists

This commit is contained in:
Travis Ralston 2020-06-03 15:07:12 -06:00
parent bde327e1e6
commit c07b5ebe9a
5 changed files with 145 additions and 40 deletions

View file

@ -45,9 +45,9 @@ interface IProps {
onAddRoom?: () => void;
addRoomLabel: string;
isInvite: boolean;
height: number; // pixels
// TODO: Collapsed state
// TODO: Height
// TODO: Group invites
// TODO: Calls
// TODO: forceExpand?
@ -61,10 +61,6 @@ interface IState {
export default class RoomSublist2 extends React.Component<IProps, IState> {
private headerButton = createRef();
public setHeight(size: number) {
// TODO: Do a thing (maybe - height changes are different in FTUE)
}
private hasTiles(): boolean {
return this.numTiles > 0;
}
@ -205,9 +201,10 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
// TODO: Lazy list rendering
// TODO: Whatever scrolling magic needs to happen here
content = (
<IndicatorScrollbar className='mx_RoomSubList_scroll'>
{tiles}
</IndicatorScrollbar>
<IndicatorScrollbar
className='mx_RoomSubList_scroll'
style={{height: `${this.props.height}px`}}
>{tiles}</IndicatorScrollbar>
)
}