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

Fix sort order for facepiles which was exactly reverse #7771

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/views/elements/FacePile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ const FacePile = ({ room, onlyKnownUsers = true, numShown = DEFAULT_NUM_FACES, .
const count = members.length;

// sort users with an explicit avatar first
const iteratees = [member => !!member.getMxcAvatarUrl()];
const iteratees = [member => member.getMxcAvatarUrl() ? 0 : 1];
if (onlyKnownUsers) {
members = members.filter(isKnownMember);
} else {
// sort known users first
iteratees.unshift(member => isKnownMember(member));
iteratees.unshift(member => isKnownMember(member) ? 0 : 1);
}

// exclude ourselves from the shown members list
Expand Down