Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6926 from matrix-org/t3chguy/fix/18231
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Oct 12, 2021
2 parents 34b61ad + d050c00 commit 4416212
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion res/css/views/rooms/_RoomSublist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
}
4 changes: 2 additions & 2 deletions src/components/views/rooms/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 4416212

Please sign in to comment.