cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject git commit: fixes Splashscreen crash on WP8
Date Thu, 19 Jun 2014 12:57:14 GMT
Repository: cordova-plugin-splashscreen
Updated Branches:
  refs/heads/master c56bb9efe -> 1f50d90d9


fixes Splashscreen crash on WP8

The UI elements cannot be accessed from any other than the UI thread directly. So, enclose
UI access code in the Dispatcher.BeginInvoke()


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/1f50d90d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/1f50d90d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/1f50d90d

Branch: refs/heads/master
Commit: 1f50d90d9e3ae6bb44df24f92bc06bb247fd4608
Parents: c56bb9e
Author: Nadya Atanasova <nadya.it@gmail.com>
Authored: Thu Jun 19 12:21:48 2014 +0300
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Thu Jun 19 16:55:35 2014 +0400

----------------------------------------------------------------------
 src/wp/SplashScreen.cs | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/1f50d90d/src/wp/SplashScreen.cs
----------------------------------------------------------------------
diff --git a/src/wp/SplashScreen.cs b/src/wp/SplashScreen.cs
index da519d5..4d3545b 100644
--- a/src/wp/SplashScreen.cs
+++ b/src/wp/SplashScreen.cs
@@ -95,13 +95,13 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         public void show(string options = null)
         {
-            if (popup.IsOpen)
-            {
-                return;
-            }
-
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
+                if (popup.IsOpen)
+                {
+                    return;
+                }
+
                 popup.Child.Opacity = 0;
 
                 Storyboard story = new Storyboard();
@@ -137,13 +137,13 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         public void hide(string options = null)
         {
-            if (!popup.IsOpen)
-            {
-                return;
-            }
-
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
+                if (!popup.IsOpen)
+                {
+                    return;
+                }
+
                 popup.Child.Opacity = 1.0;
 
                 Storyboard story = new Storyboard();


Mime
View raw message