Skip to content
Snippets Groups Projects
Commit 8f664a00 authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

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

Hide update notification if notification center is enabled
parents 86066028 d498d098
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,8 @@ if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) { ...@@ -33,7 +33,8 @@ if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
$userObject = \OC::$server->getUserSession()->getUser(); $userObject = \OC::$server->getUserSession()->getUser();
if($userObject !== null) { 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() !== []) { if($updateChecker->getUpdateState() !== []) {
\OCP\Util::addScript('updatenotification', 'notification'); \OCP\Util::addScript('updatenotification', 'notification');
OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript'); OC_Hook::connect('\OCP\Config', 'js', $updateChecker, 'getJavaScript');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment