@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conpherence - update the "unread" count in notifications panel aggressively

Summary:
Fixes T7561. Basically everytime we load some transactions in the thread manager, kick off an async thread to update the notification panel.

Should I consolidate this little bit of code into something like this._handleTransactionResponse(r)... ? I just want to keep the JS clear for other engineers and I wasn't sure if that was hiding a bit too much detail.

Test Plan: user a opened durable column. user b sent user a a few messages. reloaded user a page and noted the "N" count became N-1 as the message loaded. Switched messages and saw N-2, N-3, etc as I loaded up the messages.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7561

Differential Revision: https://secure.phabricator.com/D12099

+20 -13
+12 -12
resources/celerity/map.php
··· 352 352 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761', 353 353 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 354 354 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 355 - 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'bbc850a4', 355 + 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '6a9169bb', 356 356 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e975bd12', 357 357 'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295', 358 358 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', ··· 517 517 'conpherence-menu-css' => 'c6ac5299', 518 518 'conpherence-message-pane-css' => '2526107d', 519 519 'conpherence-notification-css' => '04a6e10a', 520 - 'conpherence-thread-manager' => 'bbc850a4', 520 + 'conpherence-thread-manager' => '6a9169bb', 521 521 'conpherence-update-css' => '1099a660', 522 522 'conpherence-widget-pane-css' => '3d575438', 523 523 'differential-changeset-view-css' => '6a8b172a', ··· 1270 1270 '69adf288' => array( 1271 1271 'javelin-install', 1272 1272 ), 1273 + '6a9169bb' => array( 1274 + 'javelin-dom', 1275 + 'javelin-util', 1276 + 'javelin-stratcom', 1277 + 'javelin-install', 1278 + 'javelin-workflow', 1279 + 'javelin-router', 1280 + 'javelin-behavior-device', 1281 + 'javelin-vector', 1282 + ), 1273 1283 '6c2b09a2' => array( 1274 1284 'javelin-install', 1275 1285 'javelin-util', ··· 1683 1693 'javelin-behavior', 1684 1694 'javelin-stratcom', 1685 1695 'javelin-dom', 1686 - ), 1687 - 'bbc850a4' => array( 1688 - 'javelin-dom', 1689 - 'javelin-util', 1690 - 'javelin-stratcom', 1691 - 'javelin-install', 1692 - 'javelin-workflow', 1693 - 'javelin-router', 1694 - 'javelin-behavior-device', 1695 - 'javelin-vector', 1696 1696 ), 1697 1697 'bbdf75ca' => array( 1698 1698 'javelin-behavior',
+8 -1
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
··· 202 202 return; 203 203 } 204 204 } 205 - this._latestTransactionID = r.latest_transaction_id; 206 205 this._updating.knownID = r.latest_transaction_id; 206 + this._latestTransactionID = r.latest_transaction_id; 207 + JX.Stratcom.invoke('notification-panel-update', null, {}); 208 + 207 209 this._didUpdateThreadCallback(r); 208 210 })); 209 211 ··· 234 236 .setHandler(JX.bind(this, function(r) { 235 237 if (this._shouldUpdateDOM(r)) { 236 238 this._latestTransactionID = r.latest_transaction_id; 239 + JX.Stratcom.invoke('notification-panel-update', null, {}); 240 + 237 241 this._didUpdateWorkflowCallback(r); 238 242 } 239 243 })); ··· 259 263 this._loadedThreadID = r.threadID; 260 264 this._loadedThreadPHID = r.threadPHID; 261 265 this._latestTransactionID = r.latestTransactionID; 266 + JX.Stratcom.invoke('notification-panel-update', null, {}); 262 267 263 268 this._didLoadThreadCallback(r); 264 269 }); ··· 279 284 .setHandler(JX.bind(this, function(r) { 280 285 if (this._shouldUpdateDOM(r)) { 281 286 this._latestTransactionID = r.latest_transaction_id; 287 + JX.Stratcom.invoke('notification-panel-update', null, {}); 288 + 282 289 this._didSendMessageCallback(r); 283 290 } 284 291 }));