cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [2/7] wp7 commit: [CB-1593] Fix for multiple callbacks when playing a media file
Date Mon, 04 Feb 2013 20:31:48 GMT
[CB-1593] Fix for multiple callbacks when playing a media file


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp7/commit/d18c94b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp7/tree/d18c94b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp7/diff/d18c94b0

Branch: refs/heads/master
Commit: d18c94b08c764688b1a3b676652cb5b552c3499c
Parents: 9d6837c
Author: Benn Mapes <benn.mapes@gmail.com>
Authored: Thu Jan 24 17:33:26 2013 -0800
Committer: Benn Mapes <benn.mapes@gmail.com>
Committed: Thu Jan 24 17:33:26 2013 -0800

----------------------------------------------------------------------
 templates/standalone/cordovalib/NativeExecution.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp7/blob/d18c94b0/templates/standalone/cordovalib/NativeExecution.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/NativeExecution.cs b/templates/standalone/cordovalib/NativeExecution.cs
index 4b8b52e..9459ffc 100644
--- a/templates/standalone/cordovalib/NativeExecution.cs
+++ b/templates/standalone/cordovalib/NativeExecution.cs
@@ -90,6 +90,7 @@ namespace WPCordovaClassLib.Cordova
                     this.OnCommandResult(commandCallParams.CallbackId, res);
                 };
 
+                bc.OnCommandResult -= OnCommandResultHandler;
                 bc.OnCommandResult += OnCommandResultHandler;
 
                 EventHandler<ScriptCallback> OnCustomScriptHandler = delegate(object
o, ScriptCallback script)
@@ -97,7 +98,7 @@ namespace WPCordovaClassLib.Cordova
                     this.InvokeScriptCallback(script);
                 };
 
-
+                bc.OnCustomScript -= OnCustomScriptHandler;
                 bc.OnCustomScript += OnCustomScriptHandler;
 
                 // TODO: alternative way is using thread pool (ThreadPool.QueueUserWorkItem)
instead of 


Mime
View raw message