summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-09-01 11:11:25 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-09-01 11:11:25 -0400
commitdc5dd1c8684266c320cccd6e8943b5d419a280e4 (patch)
treea7e77fcbde6f939ef90671c96a46eabaaa31663f /www/js
parente68762448ec8310ccf12c3ffe45e13df4ce4db00 (diff)
blog date was never really being recovered, only stored, therefore always showing new post indications
Former-commit-id: 113885c1d55adbbb4d758b0acaf535189e944767
Diffstat (limited to 'www/js')
-rw-r--r--www/js/DataModel.js5
-rw-r--r--www/js/app.js7
2 files changed, 10 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 328df81a..109745fe 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -291,6 +291,7 @@ angular.module('zmApp.controllers')
},
setLatestBlogPostChecked: function (val) {
+ console.log (">>>>>>>>>>>> Setting blog date: " + val);
latestBlogPostChecked = val;
localforage.setItem("latestBlogPostChecked", latestBlogPostChecked);
},
@@ -453,6 +454,8 @@ angular.module('zmApp.controllers')
zmLog("ZMData init: checking for stored variables & setting up log file");
+
+ latestBlogPostChecked = localforage.getItem("latestBlogPostChecked") || null;
$ionicLoading.show({
template: "retrieving profile data..."
@@ -691,7 +694,7 @@ angular.module('zmApp.controllers')
monitorsLoaded = 0;
//console.log("Getting out of ZMDataModel init");
$rootScope.showBlog = loginData.enableBlog;
- zmDebug("loginData structure values: " + JSON.stringify(loginData));
+ //zmDebug("loginData structure values: " + JSON.stringify(loginData));
});
diff --git a/www/js/app.js b/www/js/app.js
index c036115a..6aacd8c9 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -566,11 +566,15 @@ angular.module('zmApp', [
if ($rootScope.platformOS == "desktop") {
zmUpdateVersion = zmUpdateVersion + "D";
}
- if (ZMDataModel.getAppVersion() != zmUpdateVersion) {
+ //if (ZMDataModel.getAppVersion() != zmUpdateVersion) {
+ if (ZMDataModel.versionCompare(ZMDataModel.getAppVersion(),zmUpdateVersion) == -1) {
$rootScope.newVersionAvailable = "v" + zmUpdateVersion + " available";
} else {
$rootScope.newVersionAvailable = "";
}
+ ZMDataModel.zmDebug ("current version: " + currentVersion + " & available version " + zmUpdateVersion);
+ console.log ("Version compare returned: " + ZMDataModel.versionCompare(currentVersion, zmUpdateVersion));
+ console.log ("Version compare returned: " + ZMDataModel.versionCompare(zmUpdateVersion, currentVersion));
//console.log ("UPDATE " + zmVersion);
});
@@ -584,6 +588,7 @@ angular.module('zmApp', [
}
var lastDate = ZMDataModel.getLatestBlogPostChecked();
+ console.log ("************ BLOG LAST DATE " + lastDate);
if (!lastDate) {
$rootScope.newBlogPost = "(new post)";