Page MenuHomePhabricator

D12760.id30676.diff
No OneTemporary

D12760.id30676.diff

diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php
--- a/src/applications/conpherence/controller/ConpherenceUpdateController.php
+++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php
@@ -453,6 +453,7 @@
$conpherence_id,
$latest_transaction_id) {
+ $minimal_display = $this->getRequest()->getExists('minimal_display');
$need_widget_data = false;
$need_transactions = false;
$need_participant_cache = true;
@@ -464,7 +465,7 @@
case ConpherenceUpdateActions::MESSAGE:
case ConpherenceUpdateActions::ADD_PERSON:
$need_transactions = true;
- $need_widget_data = true;
+ $need_widget_data = !$minimal_display;
break;
case ConpherenceUpdateActions::REMOVE_PERSON:
case ConpherenceUpdateActions::NOTIFICATIONS:
@@ -488,7 +489,7 @@
$data = ConpherenceTransactionRenderer::renderTransactions(
$user,
$conpherence,
- !$this->getRequest()->getExists('minimal_display'));
+ !$minimal_display);
$participant_obj = $conpherence->getParticipant($user->getPHID());
$participant_obj->markUpToDate($conpherence, $data['latest_transaction']);
} else if ($need_transactions) {
@@ -505,51 +506,55 @@
$header = null;
$people_widget = null;
$file_widget = null;
- switch ($action) {
- case ConpherenceUpdateActions::METADATA:
- $policy_objects = id(new PhabricatorPolicyQuery())
- ->setViewer($user)
- ->setObject($conpherence)
- ->execute();
- $header = $this->buildHeaderPaneContent($conpherence, $policy_objects);
- $nav_item = id(new ConpherenceThreadListView())
- ->setUser($user)
- ->setBaseURI($this->getApplicationURI())
- ->renderSingleThread($conpherence);
- break;
- case ConpherenceUpdateActions::MESSAGE:
- $file_widget = id(new ConpherenceFileWidgetView())
- ->setUser($this->getRequest()->getUser())
- ->setConpherence($conpherence)
- ->setUpdateURI($widget_uri);
- break;
- case ConpherenceUpdateActions::ADD_PERSON:
- $people_widget = id(new ConpherencePeopleWidgetView())
- ->setUser($user)
- ->setConpherence($conpherence)
- ->setUpdateURI($widget_uri);
- break;
- case ConpherenceUpdateActions::REMOVE_PERSON:
- case ConpherenceUpdateActions::NOTIFICATIONS:
- default:
- break;
+ if (!$minimal_display) {
+ switch ($action) {
+ case ConpherenceUpdateActions::METADATA:
+ $policy_objects = id(new PhabricatorPolicyQuery())
+ ->setViewer($user)
+ ->setObject($conpherence)
+ ->execute();
+ $header = $this->buildHeaderPaneContent(
+ $conpherence,
+ $policy_objects);
+ $header = hsprintf('%s', $header);
+ $nav_item = id(new ConpherenceThreadListView())
+ ->setUser($user)
+ ->setBaseURI($this->getApplicationURI())
+ ->renderSingleThread($conpherence);
+ $nav_item = hsprintf('%s', $nav_item);
+ break;
+ case ConpherenceUpdateActions::MESSAGE:
+ $file_widget = id(new ConpherenceFileWidgetView())
+ ->setUser($this->getRequest()->getUser())
+ ->setConpherence($conpherence)
+ ->setUpdateURI($widget_uri);
+ $file_widget = $file_widget->render();
+ break;
+ case ConpherenceUpdateActions::ADD_PERSON:
+ $people_widget = id(new ConpherencePeopleWidgetView())
+ ->setUser($user)
+ ->setConpherence($conpherence)
+ ->setUpdateURI($widget_uri);
+ $people_widget = $people_widget->render();
+ break;
+ case ConpherenceUpdateActions::REMOVE_PERSON:
+ case ConpherenceUpdateActions::NOTIFICATIONS:
+ default:
+ break;
+ }
}
- $people_html = null;
- if ($people_widget) {
- $people_html = hsprintf('%s', $people_widget->render());
- }
$data = $conpherence->getDisplayData($user);
$content = array(
'non_update' => $non_update,
'transactions' => hsprintf('%s', $rendered_transactions),
'conpherence_title' => (string) $data['title'],
'latest_transaction_id' => $new_latest_transaction_id,
- 'nav_item' => hsprintf('%s', $nav_item),
+ 'nav_item' => $nav_item,
'conpherence_phid' => $conpherence->getPHID(),
- 'header' => hsprintf('%s', $header),
- 'file_widget' => $file_widget ? $file_widget->render() : null,
- 'people_widget' => $people_html,
+ 'header' => $header,
+ 'file_widget' => $file_widget,
+ 'people_widget' => $people_widget,
);
return $content;

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 31, 8:09 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734086
Default Alt Text
D12760.id30676.diff (4 KB)

Event Timeline