diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-01-21 00:20:03 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-01-21 00:20:03 +0100 |
| commit | f5f8633721fde74496f02f95bc2f3d4f3ae0c004 (patch) | |
| tree | 4981ba07c2ab6df73e39029e7ecc97aaa4eefaf5 | |
| parent | 32897d119504d8acac7f1f68ccc058760fd03ac6 (diff) | |
think i have all the kinks worked out of running the app offline
| -rwxr-xr-x | StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate | bin | 41993 -> 41993 bytes | |||
| -rwxr-xr-x | StoneIsland/platforms/ios/www/js/index.js | 11 | ||||
| -rwxr-xr-x | StoneIsland/www/js/index.js | 11 |
3 files changed, 8 insertions, 14 deletions
diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate Binary files differindex 3af772cc..43f07510 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate 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") diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index b112721d..cf0116d4 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/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") |
