@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conpherence - sort participant list in main conpherence with an actual algorithm

Summary: Fixes T7765. The existing sort was based on when people were added to the conpherence and basically feels random in time. Instead, sort current logged in user to the top and make the rest of the list alphabetical.

Test Plan:
viewed a conpherenece and noted my logged in user at top and the rest was sorted alphabetically
viewed a room that i was not a participant in and participant list rendered correctly

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7765

Differential Revision: https://secure.phabricator.com/D12302

+4 -4
+4 -4
src/applications/conpherence/view/ConpherencePeopleWidgetView.php
··· 9 9 $conpherence = $this->getConpherence(); 10 10 $participants = $conpherence->getParticipants(); 11 11 $handles = $conpherence->getHandles(); 12 + $handles = msort($handles, 'getName'); 13 + $head_handles = array_select_keys($handles, array($user->getPHID())); 14 + $handles = $head_handles + $handles; 12 15 13 16 $body = array(); 14 - // future proof by using participants to iterate through handles; 15 - // we may have non-people handles sooner or later 16 - foreach ($participants as $user_phid => $participant) { 17 - $handle = $handles[$user_phid]; 17 + foreach ($handles as $user_phid => $handle) { 18 18 $remove_html = ''; 19 19 if ($user_phid == $user->getPHID()) { 20 20 $icon = id(new PHUIIconView())