Page MenuHomePhabricator

D12761.id30673.diff
No OneTemporary

D12761.id30673.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'ca3f6a60',
- 'core.pkg.js' => '5a18f0ab',
+ 'core.pkg.js' => '4c2f587f',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => 'bb338e4b',
'differential.pkg.js' => '895b8d62',
@@ -341,12 +341,12 @@
'rsrc/image/texture/table_header_hover.png' => '038ec3b9',
'rsrc/image/texture/table_header_tall.png' => 'd56b434f',
'rsrc/js/application/aphlict/Aphlict.js' => '5359e785',
- 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '0323afdd',
+ 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '995ad707',
'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => 'b1a59974',
'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761',
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
- 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '7a608e21',
+ 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '9e507b59',
'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a',
'rsrc/js/application/conpherence/behavior-durable-column.js' => '657c2b50',
'rsrc/js/application/conpherence/behavior-menu.js' => '804b0773',
@@ -513,7 +513,7 @@
'conpherence-menu-css' => 'f389e048',
'conpherence-message-pane-css' => '3150e2a2',
'conpherence-notification-css' => 'd208f806',
- 'conpherence-thread-manager' => '7a608e21',
+ 'conpherence-thread-manager' => '9e507b59',
'conpherence-transaction-css' => '25138b7f',
'conpherence-update-css' => '1099a660',
'conpherence-widget-pane-css' => '2af42ebe',
@@ -541,7 +541,7 @@
'inline-comment-summary-css' => 'eb5f8e8c',
'javelin-aphlict' => '5359e785',
'javelin-behavior' => '61cbc29a',
- 'javelin-behavior-aphlict-dropdown' => '0323afdd',
+ 'javelin-behavior-aphlict-dropdown' => '995ad707',
'javelin-behavior-aphlict-listen' => 'b1a59974',
'javelin-behavior-aphlict-status' => 'ea681761',
'javelin-behavior-aphront-basic-tokenizer' => 'b3a4b884',
@@ -836,16 +836,6 @@
'029a133d' => array(
'aphront-dialog-view-css',
),
- '0323afdd' => array(
- 'javelin-behavior',
- 'javelin-request',
- 'javelin-stratcom',
- 'javelin-vector',
- 'javelin-dom',
- 'javelin-uri',
- 'javelin-behavior-device',
- 'phabricator-title',
- ),
'048330fa' => array(
'javelin-behavior',
'javelin-typeahead-ondemand-source',
@@ -1380,17 +1370,6 @@
'javelin-behavior',
'javelin-quicksand',
),
- '7a608e21' => array(
- 'javelin-dom',
- 'javelin-util',
- 'javelin-stratcom',
- 'javelin-install',
- 'javelin-aphlict',
- 'javelin-workflow',
- 'javelin-router',
- 'javelin-behavior-device',
- 'javelin-vector',
- ),
'7a68dda3' => array(
'owners-path-editor',
'javelin-behavior',
@@ -1589,6 +1568,16 @@
'javelin-dom',
'javelin-reactor-dom',
),
+ '995ad707' => array(
+ 'javelin-behavior',
+ 'javelin-request',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ 'javelin-dom',
+ 'javelin-uri',
+ 'javelin-behavior-device',
+ 'phabricator-title',
+ ),
'9a340b3d' => array(
'javelin-behavior',
'javelin-dom',
@@ -1598,6 +1587,17 @@
'phuix-action-view',
'javelin-workflow',
),
+ '9e507b59' => array(
+ 'javelin-dom',
+ 'javelin-util',
+ 'javelin-stratcom',
+ 'javelin-install',
+ 'javelin-aphlict',
+ 'javelin-workflow',
+ 'javelin-router',
+ 'javelin-behavior-device',
+ 'javelin-vector',
+ ),
'9f36c42d' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/applications/conpherence/controller/ConpherenceColumnViewController.php b/src/applications/conpherence/controller/ConpherenceColumnViewController.php
--- a/src/applications/conpherence/controller/ConpherenceColumnViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceColumnViewController.php
@@ -88,12 +88,19 @@
PhabricatorPolicyCapability::CAN_EDIT);
}
+ $dropdown_query = id(new AphlictDropdownDataQuery())
+ ->setViewer($user);
+ $dropdown_query->execute();
$response = array(
'content' => hsprintf('%s', $durable_column),
'threadID' => $conpherence_id,
'threadPHID' => $conpherence_phid,
'latestTransactionID' => $latest_transaction_id,
'canEdit' => $can_edit,
+ 'aphlictDropdownData' => array(
+ $dropdown_query->getNotificationData(),
+ $dropdown_query->getConpherenceData(),
+ ),
);
return id(new AphrontAjaxResponse())->setContent($response);
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
@@ -519,7 +519,7 @@
break;
case ConpherenceUpdateActions::MESSAGE:
$file_widget = id(new ConpherenceFileWidgetView())
- ->setUser($this->getRequest()->getUser())
+ ->setUser($user)
->setConpherence($conpherence)
->setUpdateURI($widget_uri);
break;
@@ -540,6 +540,9 @@
$people_html = hsprintf('%s', $people_widget->render());
}
$data = $conpherence->getDisplayData($user);
+ $dropdown_query = id(new AphlictDropdownDataQuery())
+ ->setViewer($user);
+ $dropdown_query->execute();
$content = array(
'non_update' => $non_update,
'transactions' => hsprintf('%s', $rendered_transactions),
@@ -550,6 +553,10 @@
'header' => hsprintf('%s', $header),
'file_widget' => $file_widget ? $file_widget->render() : null,
'people_widget' => $people_html,
+ 'aphlictDropdownData' => array(
+ $dropdown_query->getNotificationData(),
+ $dropdown_query->getConpherenceData(),
+ ),
);
return $content;
diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php
--- a/src/applications/conpherence/controller/ConpherenceViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceViewController.php
@@ -94,6 +94,9 @@
$content['title'] = $title = $d_data['title'];
if ($request->isAjax()) {
+ $dropdown_query = id(new AphlictDropdownDataQuery())
+ ->setViewer($user);
+ $dropdown_query->execute();
$content['threadID'] = $conpherence->getID();
$content['threadPHID'] = $conpherence->getPHID();
$content['latestTransactionID'] = $data['latest_transaction_id'];
@@ -101,6 +104,10 @@
$user,
$conpherence,
PhabricatorPolicyCapability::CAN_EDIT);
+ $content['aphlictDropdownData'] = array(
+ $dropdown_query->getNotificationData(),
+ $dropdown_query->getConpherenceData(),
+ );
return id(new AphrontAjaxResponse())->setContent($content);
}
diff --git a/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js b/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
--- a/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
+++ b/webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
@@ -93,22 +93,33 @@
if (!data.fromServer) {
return;
}
- var updated = false;
var new_data = data.newResponse.aphlictDropdownData;
- for (var ii = 0; ii < new_data.length; ii++) {
- if (new_data[ii].countType != config.countType) {
- continue;
- }
- if (!new_data[ii].isInstalled) {
- continue;
- }
- updated = true;
- _updateCount(parseInt(new_data[ii].count));
+ update_counts(new_data);
+ });
+
+ JX.Stratcom.listen(
+ 'conpherence-redraw-aphlict',
+ null,
+ function (e) {
+ update_counts(e.getData());
+ });
+
+ function update_counts(new_data) {
+ var updated = false;
+ for (var ii = 0; ii < new_data.length; ii++) {
+ if (new_data[ii].countType != config.countType) {
+ continue;
}
- if (updated) {
- dirty = true;
+ if (!new_data[ii].isInstalled) {
+ continue;
}
- });
+ updated = true;
+ _updateCount(parseInt(new_data[ii].count));
+ }
+ if (updated) {
+ dirty = true;
+ }
+ }
function set_visible(menu, icon) {
if (menu) {
diff --git a/webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js b/webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
--- a/webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
+++ b/webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
@@ -205,7 +205,10 @@
_markUpdated: function(r) {
this._updating.knownID = r.latest_transaction_id;
this._latestTransactionID = r.latest_transaction_id;
- JX.Stratcom.invoke('notification-panel-update', null, {});
+ JX.Stratcom.invoke(
+ 'conpherence-redraw-aphlict',
+ null,
+ r.aphlictDropdownData);
},
_updateThread: function() {
@@ -298,7 +301,10 @@
this._latestTransactionID = r.latestTransactionID;
this._canEditLoadedThread = r.canEdit;
- JX.Stratcom.invoke('notification-panel-update', null, {});
+ JX.Stratcom.invoke(
+ 'conpherence-redraw-aphlict',
+ null,
+ r.aphlictDropdownData);
this._didLoadThreadCallback(r);

File Metadata

Mime Type
text/plain
Expires
Oct 17 2024, 8:37 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721411
Default Alt Text
D12761.id30673.diff (9 KB)

Event Timeline