Notifications - hide header dropdown if app is uninstalled
Summary: Fixes T5019. Test Plan: uninstalled notifications and dropdown disappeared too Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5019 Differential Revision: https://secure.phabricator.com/D9121
This commit is contained in:
@@ -38,7 +38,9 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||
|
||||
if ($user->isLoggedIn() && $user->isUserActivated()) {
|
||||
list($menu, $dropdowns, $aural) = $this->renderNotificationMenu();
|
||||
if (array_filter($menu)) {
|
||||
$alerts[] = $menu;
|
||||
}
|
||||
$menus = array_merge($menus, $dropdowns);
|
||||
$app_button = $this->renderApplicationMenuButton($header_id);
|
||||
$search_button = $this->renderSearchMenuButton($header_id);
|
||||
@@ -281,7 +283,9 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||
$message_tag = '';
|
||||
$message_notification_dropdown = '';
|
||||
$conpherence = 'PhabricatorApplicationConpherence';
|
||||
if (PhabricatorApplication::isClassInstalled($conpherence)) {
|
||||
if (PhabricatorApplication::isClassInstalledForViewer(
|
||||
$conpherence,
|
||||
$user)) {
|
||||
$message_id = celerity_generate_unique_node_id();
|
||||
$message_count_id = celerity_generate_unique_node_id();
|
||||
$message_dropdown_id = celerity_generate_unique_node_id();
|
||||
@@ -362,6 +366,12 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||
'');
|
||||
}
|
||||
|
||||
$bubble_tag = '';
|
||||
$notification_dropdown = '';
|
||||
$notification_app = 'PhabricatorApplicationNotifications';
|
||||
if (PhabricatorApplication::isClassInstalledForViewer(
|
||||
$notification_app,
|
||||
$user)) {
|
||||
$count_id = celerity_generate_unique_node_id();
|
||||
$dropdown_id = celerity_generate_unique_node_id();
|
||||
$bubble_id = celerity_generate_unique_node_id();
|
||||
@@ -433,6 +443,7 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||
'style' => 'display: none;',
|
||||
),
|
||||
'');
|
||||
}
|
||||
|
||||
$dropdowns = array(
|
||||
$notification_dropdown,
|
||||
|
||||
Reference in New Issue
Block a user