From 2ed50ad9ea7844afcd8aa2a63bf0844460e24d37 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 24 Nov 2017 17:58:49 +0100 Subject: really fix deep linking --- StoneIsland/www/js/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js/index.js') diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 4cae2f24..164d98cc 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -103,10 +103,10 @@ var app = (function(){ // } if (navigator.onLine) { - app.account.connect(app.deepLinkRoute || '/intro') + app.account.connect(window.deepLinkRoute || '/intro') app.blog.fetch(function(){ console.log("navigating to deep link route after fetch") - app.router.initial_route = app.deepLinkRoute || "/intro" + app.router.initial_route = window.deepLinkRoute || "/intro" app.router.launch() }) } @@ -124,6 +124,9 @@ var app = (function(){ if (window.cordova) { navigator.splashscreen.hide() } + if (window.deepLinkRoute) { + app.router.go(window.deepLinkRoute) + } $("body").removeClass("loading") } -- cgit v1.2.3-70-g09d2