diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-02-04 16:11:10 -0500 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-02-04 16:11:10 -0500 |
| commit | e46933daa53ccf6745c795e5b3c8f1cc51be2403 (patch) | |
| tree | 644aa8ea8038ba376cfce993fd5a87fdbe031bbf /www/js/app.js | |
| parent | 1433c6e5c34c516d21e31b73917dc97f46418bd5 (diff) | |
only show blog notifications for critical posts
Former-commit-id: 1293779e9506d9c27ad6acdcb670512319273bd6
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/www/js/app.js b/www/js/app.js index 716104e7..d847eac9 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -441,6 +441,7 @@ angular.module('zmApp', [ var lastDate = $localstorage.get("latestBlogPostChecked"); if (!lastDate) { + $rootScope.newBlogPost="(new post)"; return; } @@ -451,8 +452,14 @@ angular.module('zmApp', [ if (mItemDate.diff(mLastDate) >0) { ZMDataModel.zmDebug("New post dated " + data[0].date + " found"); - $rootScope.newBlogPost = "(new post)"; - + if (data[0].level == "critical" ) + { + $rootScope.newBlogPost = "(new post)"; + } + else + { + ZMDataModel.zmDebug ("Not showing a notification in menu as this is not critical"); + } } else { |
