Merge pull request #6926 from matrix-org/t3chguy/fix/18231

This commit is contained in:
Michael Telatynski 2021-10-12 14:03:12 +01:00 committed by GitHub
commit 4416212d0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -391,7 +391,7 @@ limitations under the License.
.mx_RoomSublist_skeletonUI {
position: relative;
margin-left: 4px;
height: 288px;
height: 240px;
&::before {
background: $roomsublist-skeleton-ui-bg;
@ -406,3 +406,8 @@ limitations under the License.
mask-image: url('$(res)/img/element-icons/roomlist/skeleton-ui.svg');
}
}
.mx_RoomSublist_minimized .mx_RoomSublist_skeletonUI {
width: 32px; // cut off the horizontal lines in the svg
margin-left: 10px; // align with sublist + buttons
}

View file

@ -449,8 +449,8 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
}
private renderSublists(): React.ReactElement[] {
// show a skeleton UI if the user is in no rooms and they are not filtering
const showSkeleton = !this.state.isNameFiltering &&
// show a skeleton UI if the user is in no rooms and they are not filtering and have no suggested rooms
const showSkeleton = !this.state.isNameFiltering && !this.state.suggestedRooms?.length &&
Object.values(RoomListStore.instance.unfilteredLists).every(list => !list?.length);
return TAG_ORDER.reduce((tags, tagId) => {