Move first-thread selection to the client in Conpherence
Summary: Ref T2421. For mobile, we don't want to select the first thread, since we'll just show a list of threads. Move this behavior to the client and do it when the page is shown on a desktop (or the view is changed to a desktop). Test Plan: Viewed `/conpherence/`, saw first thread selected. Switched threads. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2421 Differential Revision: https://secure.phabricator.com/D5502
This commit is contained in:
@@ -27,6 +27,7 @@ final class ConpherenceListController extends
|
||||
|
||||
$conpherence_id = $this->getConpherenceID();
|
||||
$current_selection_epoch = null;
|
||||
$selected_phid = null;
|
||||
if ($conpherence_id) {
|
||||
$conpherence = id(new ConpherenceThreadQuery())
|
||||
->setViewer($user)
|
||||
@@ -39,7 +40,7 @@ final class ConpherenceListController extends
|
||||
if ($conpherence->getTitle()) {
|
||||
$title = $conpherence->getTitle();
|
||||
}
|
||||
$this->setSelectedConpherencePHID($conpherence->getPHID());
|
||||
$selected_phid = $conpherence->getPHID();
|
||||
|
||||
$participant = $conpherence->getParticipant($user->getPHID());
|
||||
$current_selection_epoch = $participant->getDateTouched();
|
||||
@@ -50,7 +51,7 @@ final class ConpherenceListController extends
|
||||
|
||||
$main_pane = id(new ConpherenceLayoutView())
|
||||
->setBaseURI($this->getApplicationURI())
|
||||
->setSelectedConpherencePHID($this->getSelectedConpherencePHID());
|
||||
->setSelectedConpherencePHID($selected_phid);
|
||||
|
||||
$nav->appendChild(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user