diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index fa6ce29a98..b2cdd3df61 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -166,10 +166,21 @@ abstract class PhabricatorController extends AphrontController { $view = $nav; } - $view->setUser($this->getRequest()->getUser()); + $user = $this->getRequest()->getUser(); + $view->setUser($user); $page->appendChild($view); + $object_phids = idx($options, 'pageObjects', array()); + if ($object_phids) { + $page->appendPageObjects($object_phids); + foreach ($object_phids as $object_phid) { + PhabricatorFeedStoryNotification::updateObjectNotificationViews( + $user, + $object_phid); + } + } + if (idx($options, 'device')) { $page->setDeviceReady(true); } diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 841b494445..99a0f5e03c 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -398,9 +398,6 @@ final class DifferentialRevisionViewController extends DifferentialController { $page_pane->appendChild($comment_form->render()); } - PhabricatorFeedStoryNotification::updateObjectNotificationViews( - $user, $revision->getPHID()); - $object_id = 'D'.$revision->getID(); $top_anchor = id(new PhabricatorAnchorView()) @@ -445,6 +442,7 @@ final class DifferentialRevisionViewController extends DifferentialController { $content, array( 'title' => $object_id.' '.$revision->getTitle(), + 'pageObjects' => array($revision->getPHID()), )); } diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index ffe573d521..1292a90f76 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -331,9 +331,6 @@ final class ManiphestTaskDetailController extends ManiphestController { $transaction_view->setAuxiliaryFields($aux_fields); $transaction_view->setMarkupEngine($engine); - PhabricatorFeedStoryNotification::updateObjectNotificationViews( - $user, $task->getPHID()); - $object_name = 'T'.$task->getID(); $actions = $this->buildActionView($task); diff --git a/src/applications/paste/controller/PhabricatorPasteViewController.php b/src/applications/paste/controller/PhabricatorPasteViewController.php index f0e4c3f59c..2462f452cc 100644 --- a/src/applications/paste/controller/PhabricatorPasteViewController.php +++ b/src/applications/paste/controller/PhabricatorPasteViewController.php @@ -70,6 +70,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController { array( 'title' => $paste->getFullName(), 'device' => true, + 'pageObjects' => array($paste->getPHID()), )); } diff --git a/src/applications/pholio/controller/PholioMockViewController.php b/src/applications/pholio/controller/PholioMockViewController.php index b34d48087e..4fea7369da 100644 --- a/src/applications/pholio/controller/PholioMockViewController.php +++ b/src/applications/pholio/controller/PholioMockViewController.php @@ -101,10 +101,6 @@ final class PholioMockViewController extends PholioController { $add_comment, ); - PhabricatorFeedStoryNotification::updateObjectNotificationViews( - $user, - $mock->getPHID()); - return $this->buildApplicationPage( $content, array( diff --git a/src/applications/tokens/event/PhabricatorTokenUIEventListener.php b/src/applications/tokens/event/PhabricatorTokenUIEventListener.php index a046c4cd5e..ec4c9e08f7 100644 --- a/src/applications/tokens/event/PhabricatorTokenUIEventListener.php +++ b/src/applications/tokens/event/PhabricatorTokenUIEventListener.php @@ -96,6 +96,8 @@ final class PhabricatorTokenUIEventListener ->setViewer($user) ->loadHandles(); + Javelin::initBehavior('phabricator-tooltips'); + $list = array(); foreach ($tokens_given as $token_given) { if (!idx($tokens, $token_given->getTokenPHID())) {