Merge pull request #2803 from nextcloud/hide-notification-for-updates

Hide update notification if notification center is enabled
This commit is contained in:
Joas Schilling 2016-12-22 10:39:15 +01:00 committed by GitHub
commit 8f664a00e1
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
$userObject = \OC::$server->getUserSession()->getUser();
if($userObject !== null) {
if(\OC::$server->getGroupManager()->isAdmin($userObject->getUID())) {
if(\OC::$server->getGroupManager()->isAdmin($userObject->getUID()) &&
!\OC::$server->getAppManager()->isEnabledForUser('notifications')) {
if($updateChecker->getUpdateState() !== []) {
\OCP\Util::addScript('updatenotification', 'notification');
OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript');