mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
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:
parent
53e95d37cf
commit
67a5dfa662
1 changed files with 78 additions and 67 deletions
|
@ -38,7 +38,9 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||||
|
|
||||||
if ($user->isLoggedIn() && $user->isUserActivated()) {
|
if ($user->isLoggedIn() && $user->isUserActivated()) {
|
||||||
list($menu, $dropdowns, $aural) = $this->renderNotificationMenu();
|
list($menu, $dropdowns, $aural) = $this->renderNotificationMenu();
|
||||||
|
if (array_filter($menu)) {
|
||||||
$alerts[] = $menu;
|
$alerts[] = $menu;
|
||||||
|
}
|
||||||
$menus = array_merge($menus, $dropdowns);
|
$menus = array_merge($menus, $dropdowns);
|
||||||
$app_button = $this->renderApplicationMenuButton($header_id);
|
$app_button = $this->renderApplicationMenuButton($header_id);
|
||||||
$search_button = $this->renderSearchMenuButton($header_id);
|
$search_button = $this->renderSearchMenuButton($header_id);
|
||||||
|
@ -281,7 +283,9 @@ final class PhabricatorMainMenuView extends AphrontView {
|
||||||
$message_tag = '';
|
$message_tag = '';
|
||||||
$message_notification_dropdown = '';
|
$message_notification_dropdown = '';
|
||||||
$conpherence = 'PhabricatorApplicationConpherence';
|
$conpherence = 'PhabricatorApplicationConpherence';
|
||||||
if (PhabricatorApplication::isClassInstalled($conpherence)) {
|
if (PhabricatorApplication::isClassInstalledForViewer(
|
||||||
|
$conpherence,
|
||||||
|
$user)) {
|
||||||
$message_id = celerity_generate_unique_node_id();
|
$message_id = celerity_generate_unique_node_id();
|
||||||
$message_count_id = celerity_generate_unique_node_id();
|
$message_count_id = celerity_generate_unique_node_id();
|
||||||
$message_dropdown_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();
|
$count_id = celerity_generate_unique_node_id();
|
||||||
$dropdown_id = celerity_generate_unique_node_id();
|
$dropdown_id = celerity_generate_unique_node_id();
|
||||||
$bubble_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;',
|
'style' => 'display: none;',
|
||||||
),
|
),
|
||||||
'');
|
'');
|
||||||
|
}
|
||||||
|
|
||||||
$dropdowns = array(
|
$dropdowns = array(
|
||||||
$notification_dropdown,
|
$notification_dropdown,
|
||||||
|
|
Loading…
Reference in a new issue