diff --git a/www/index.html b/www/index.html index 4d3ffb5..4fa0fa3 100644 --- a/www/index.html +++ b/www/index.html @@ -9,6 +9,17 @@ + + + + diff --git a/www/js/ApiService.js b/www/js/ApiService.js index 4657be7..e280850 100644 --- a/www/js/ApiService.js +++ b/www/js/ApiService.js @@ -87,14 +87,14 @@ starter.factory('ApiService', ['$http', '$ionicPopup', '$ionicModal', function ( $http.get("https://ajax.googleapis.com/ajax/services/feed/load?v=2.0&num=10&q=https://www.facebook.com/feeds/page.php?id=597726260353610%26format=rss20").then(function(resp) { console.log('Success', resp); console.log("[JCE] [INFO] : in update - Got Aguda from Facebook!"); - if(grades === null){ + if(agudaPosts === null){ window.localStorage['newAguda'] = "true"; - window.localStorage['agudaPosts'] = JSON.stringify(resp.data); - }else if(grades === JSON.stringify(resp.data)){ + window.localStorage['agudaPosts'] = JSON.stringify(resp.data.responseData.feed.entries); + }else if(agudaPosts === JSON.stringify(resp.data.responseData.feed.entries)){ console.log("[JCE] [INFO] : in update - no new newAguda"); }else{ window.localStorage['newAguda'] = "true"; - window.localStorage['agudaPosts'] = JSON.stringify(resp.data); + window.localStorage['agudaPosts'] = JSON.stringify(resp.data.responseData.feed.entries); } }, function(err) { diff --git a/www/js/controllers.js b/www/js/controllers.js index 8773a33..63c9821 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -358,6 +358,11 @@ angular.module('starter.controllers', []) $scope.update = function(){ console.log("[JCE] [info]: Refreshing..."); ApiService.update(); + + $timeout(function() { + $scope.$broadcast('scroll.refreshComplete'); //close the popup after 3 seconds for some reason + }, 3000); + if(window.localStorage['newNotes'] === "true") $scope.newNotes = true; else @@ -368,10 +373,10 @@ angular.module('starter.controllers', []) else $scope.newGrades = false; - $timeout(function() { - $scope.$broadcast('scroll.refreshComplete'); //close the popup after 3 seconds for some reason - }, 3000); - + if(window.localStorage['newAguda'] === "true") + $scope.newAguda = true; + else + $scope.newAguda = false; }; diff --git a/www/templates/Aouth.html b/www/templates/Aouth.html index 40ff70e..6b1e9e0 100644 --- a/www/templates/Aouth.html +++ b/www/templates/Aouth.html @@ -7,6 +7,9 @@
+
+


+