From 21411b4114af9bdce954dcfabfda9cb42daceb3a Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Sat, 11 Oct 2014 03:32:04 -0700 Subject: [PATCH] Use the mobile-launch-screen package in todos The example doesn't "flash" with the white page on mobile when launched. --- examples/todos/client/launchScreenConf.js | 4 ++++ examples/todos/lib/router.js | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 examples/todos/client/launchScreenConf.js diff --git a/examples/todos/client/launchScreenConf.js b/examples/todos/client/launchScreenConf.js new file mode 100644 index 0000000000..d5d86ba396 --- /dev/null +++ b/examples/todos/client/launchScreenConf.js @@ -0,0 +1,4 @@ +if (Meteor.isCordova) { + LaunchScreen.controlManually = true; +} + diff --git a/examples/todos/lib/router.js b/examples/todos/lib/router.js index 37cc7da856..512b09da35 100644 --- a/examples/todos/lib/router.js +++ b/examples/todos/lib/router.js @@ -31,6 +31,11 @@ Router.map(function() { }, data: function() { return Lists.findOne(this.params._id); + }, + action: function () { + this.render(); + if (Meteor.isCordova) + LaunchScreen.hide(); } }); @@ -45,4 +50,4 @@ Router.map(function() { if (Meteor.isClient) { Router.onBeforeAction('loading', {except: ['join', 'signin']}); Router.onBeforeAction('dataNotFound', {except: ['join', 'signin']}); -} \ No newline at end of file +}