mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 15:22:41 +01:00
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
This commit is contained in:
parent
7aebd2388f
commit
3a72e53795
1 changed files with 4 additions and 4 deletions
|
@ -9,12 +9,12 @@ final class ConpherencePeopleWidgetView extends ConpherenceWidgetView {
|
|||
$conpherence = $this->getConpherence();
|
||||
$participants = $conpherence->getParticipants();
|
||||
$handles = $conpherence->getHandles();
|
||||
$handles = msort($handles, 'getName');
|
||||
$head_handles = array_select_keys($handles, array($user->getPHID()));
|
||||
$handles = $head_handles + $handles;
|
||||
|
||||
$body = array();
|
||||
// future proof by using participants to iterate through handles;
|
||||
// we may have non-people handles sooner or later
|
||||
foreach ($participants as $user_phid => $participant) {
|
||||
$handle = $handles[$user_phid];
|
||||
foreach ($handles as $user_phid => $handle) {
|
||||
$remove_html = '';
|
||||
if ($user_phid == $user->getPHID()) {
|
||||
$icon = id(new PHUIIconView())
|
||||
|
|
Loading…
Reference in a new issue