From f5f8633721fde74496f02f95bc2f3d4f3ae0c004 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 21 Jan 2016 00:20:03 +0100 Subject: think i have all the kinks worked out of running the app offline --- StoneIsland/platforms/ios/www/js/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js') diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js index b112721d..cf0116d4 100755 --- a/StoneIsland/platforms/ios/www/js/index.js +++ b/StoneIsland/platforms/ios/www/js/index.js @@ -88,15 +88,14 @@ var app = (function(){ } else { console.log(">> LAUNCHED WHILE OFFLINE") - app.closed.showElement() - app.closed.setMessage("PLEASE GO ONLINE TO BROWSE THE STONE ISLAND STORE", "") - app.state.launched_while_offline = true + app.router.go("intro") app.finished_launching() } push.init() } + app.did_finish_launching = app.finished_launching = function(){ console.log(">> FINISHED LAUNCHING") if (window.cordova) { @@ -108,6 +107,8 @@ var app = (function(){ var refresh_time = +Date.now() app.paused = function(){} app.resumed = function(){ + console.log( "app is ready?", app.is_ready ) + geo.fetch() var now = +Date.now() if (now - refresh_time > 60 * 60 * 1000) { @@ -118,10 +119,6 @@ var app = (function(){ app.online = function(){ console.log(">> ONLINE") - if (app.state.launched_while_offline) { - app.state.launched_while_offline = false - app.router.go("intro") - } } app.offline = function(){ console.log(">> OFFLINE") -- cgit v1.2.3-70-g09d2