You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/03/03 23:09:56 UTC

cordova-plugin-camera git commit: CB-8599 fix threading issue with cameraPicker (fixes #72)

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 2c597a389 -> bca73e6ee


CB-8599 fix threading issue with cameraPicker (fixes #72)

Signed-off-by: Shazron Abdullah <sh...@apache.org>


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

Branch: refs/heads/master
Commit: bca73e6ee95c005dea59f6f05ff0b3f50917de33
Parents: 2c597a3
Author: Murat Sutunc <su...@gmail.com>
Authored: Tue Mar 3 13:11:01 2015 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 3 14:09:29 2015 -0800

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/bca73e6e/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 37bc716..e5ba1ee 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -167,9 +167,11 @@ static NSString* toBase64(NSData* data) {
             weakSelf.hasPendingOperation = NO;
 
         } else {
-            [weakSelf.viewController presentViewController:cameraPicker animated:YES completion:^{
-                weakSelf.hasPendingOperation = NO;
-            }];
+            dispatch_async(dispatch_get_main_queue(), ^{
+                [weakSelf.viewController presentViewController:cameraPicker animated:YES completion:^{
+                    weakSelf.hasPendingOperation = NO;
+                }];
+            });
         }
     }];
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org