Wait for updateFreq before asking user to update - Fixes #8084

This commit is contained in:
Ghislain Loaec 2015-09-24 11:37:26 +02:00
parent ad452e2700
commit 9d92d71484
2 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@
"title": "Ma ville au quotidien (Local)",
"icon": "icon.png",
"contact": "info@example.net",
"updateFreq": 5,
"updateFreq": 5000,
"manifestUrl": "http://pwr.link/entrouvert/index.json",
"assetsUrl": "http://pwr.link/entrouvert/assets.zip"
},

View File

@ -158,13 +158,16 @@ var app = {
app.loadLocalManifest();
// Check for new updates
app.checkForUpdate(app.start, app.start);
//app.checkForUpdate(app.start, app.start);
// Update Reminder
app.updateTimeout = setTimeout( app.checkForLastUpdateCheck, app.manifest.meta.updateFreq );
// Touch events faster response patch
FastClick.attach(document.body);
// Start Application
app.start();
},
initFileSystem: function(){
@ -1028,7 +1031,7 @@ var app = {
prev, next;
console.warn(app.previousPage + " -> " + page);
//console.warn(app.previousPage + " -> " + page);
// Hack of the century ?
if(app.ignoreHash){ return false; }
@ -1125,7 +1128,7 @@ var app = {
var back = page === 'home';
console.log(app.pageHistory.join(',')+ " (index = "+app.pageIndex+")");
//console.log(app.pageHistory.join(',')+ " (index = "+app.pageIndex+")");
if (app.pageHistory.length/* && app.historyLength == length*/) {
// Goind Back