fix min & max size for empty sublists
parent
1bbf1502ec
commit
aa90e9591a
|
@ -35,14 +35,15 @@ class RoomSubListItem extends ResizeItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
maxSize() {
|
maxSize() {
|
||||||
const scrollItem = this.domNode.querySelector(".mx_RoomSubList_scroll");
|
|
||||||
const header = this.domNode.querySelector(".mx_RoomSubList_labelContainer");
|
const header = this.domNode.querySelector(".mx_RoomSubList_labelContainer");
|
||||||
|
const scrollItem = this.domNode.querySelector(".mx_RoomSubList_scroll");
|
||||||
const headerHeight = this.sizer.getItemSize(header);
|
const headerHeight = this.sizer.getItemSize(header);
|
||||||
return headerHeight + scrollItem.scrollHeight;
|
return headerHeight + (scrollItem ? scrollItem.scrollHeight : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
minSize() {
|
minSize() {
|
||||||
return 74; //size of header + 1 room tile
|
const isNotEmpty = this.domNode.classList.contains("mx_RoomSubList_nonEmpty");
|
||||||
|
return isNotEmpty ? 74 : 31; //size of header + 1? room tile (see room sub list css)
|
||||||
}
|
}
|
||||||
|
|
||||||
isSized() {
|
isSized() {
|
||||||
|
|
Loading…
Reference in New Issue