From db10a37080730d3a1957b858f8bdc1710801bcbe Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 13 Apr 2016 21:09:18 +0200 Subject: Better cron warning message, do not run feed updates when in ajax or web cron mode --- js/directive/NewsInstantNotification.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/directive/NewsInstantNotification.js b/js/directive/NewsInstantNotification.js index f66db3d69..893da8f7c 100644 --- a/js/directive/NewsInstantNotification.js +++ b/js/directive/NewsInstantNotification.js @@ -10,14 +10,16 @@ app.directive('newsInstantNotification', function () { 'use strict'; - + var shown = false; return { restrict: 'E', link: function (scope, elem) { elem.hide(); - - var notification = elem.html(); - OC.Notification.showHtml(notification); + if (!shown) { + shown = true; + var notification = elem.html(); + OC.Notification.showHtml(notification); + } } }; -- cgit v1.2.3