summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-01-21 00:20:03 +0100
committerJules Laplace <jules@okfoc.us>2016-01-21 00:20:03 +0100
commitf5f8633721fde74496f02f95bc2f3d4f3ae0c004 (patch)
tree4981ba07c2ab6df73e39029e7ecc97aaa4eefaf5 /StoneIsland/www/js/index.js
parent32897d119504d8acac7f1f68ccc058760fd03ac6 (diff)
think i have all the kinks worked out of running the app offline
Diffstat (limited to 'StoneIsland/www/js/index.js')
-rwxr-xr-xStoneIsland/www/js/index.js11
1 files changed, 4 insertions, 7 deletions
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")