Add comment about what sort we're trying to achieve

This commit is contained in:
Eric Eastwood 2023-06-02 17:16:09 -05:00
parent b3c8f89d0d
commit 96bda71386
1 changed files with 1 additions and 0 deletions
shared/viewmodels

View File

@ -89,6 +89,7 @@ class RoomDirectoryViewModel extends ViewModel {
});
this._roomCardViewModelsFilterMap = new ApplyMap(this._roomCardViewModelsMap);
this._roomCardViewModels = this._roomCardViewModelsFilterMap.sortValues((a, b) => {
// Sort by the number of joined members descending (highest to lowest)
if (b.numJoinedMembers > a.numJoinedMembers) {
return 1;
} else if (b.numJoinedMembers < a.numJoinedMembers) {