Make id/phid Conpherence stuff more consistent

Summary:
Currently, `selected_conpherence_id` is actually a PHID. Instead, use ids everywhere.

Also, use replaceState instead of pushState. This means "back" takes you out of conpherence (not back to the last thread you looked at) but I think that's more consistent with user expectation.

Test Plan: Loaded thread list, loaded specific thread.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5503
This commit is contained in:
epriestley
2013-04-01 12:44:00 -07:00
parent 1fd063277b
commit 787cc1dd82
4 changed files with 26 additions and 23 deletions

View File

@@ -27,7 +27,7 @@ final class ConpherenceListController extends
$conpherence_id = $this->getConpherenceID();
$current_selection_epoch = null;
$selected_phid = null;
$conpherence = null;
if ($conpherence_id) {
$conpherence = id(new ConpherenceThreadQuery())
->setViewer($user)
@@ -40,7 +40,6 @@ final class ConpherenceListController extends
if ($conpherence->getTitle()) {
$title = $conpherence->getTitle();
}
$selected_phid = $conpherence->getPHID();
$participant = $conpherence->getParticipant($user->getPHID());
$current_selection_epoch = $participant->getDateTouched();
@@ -50,8 +49,11 @@ final class ConpherenceListController extends
$nav = $this->buildSideNavView();
$main_pane = id(new ConpherenceLayoutView())
->setBaseURI($this->getApplicationURI())
->setSelectedConpherencePHID($selected_phid);
->setBaseURI($this->getApplicationURI());
if ($conpherence) {
$main_pane->setThread($conpherence);
}
$nav->appendChild(
array(