You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2017/01/24 08:19:03 UTC

[48/50] [abbrv] incubator-weex git commit: * [ios] fix scan qrcode after back from scan result failed

* [ios] fix scan qrcode after back from scan result failed


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/0b308aab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/0b308aab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/0b308aab

Branch: refs/heads/master
Commit: 0b308aabe80d65b6fc41ed4e0be6161672527b29
Parents: 82a79d1
Author: acton393 <zh...@gmail.com>
Authored: Mon Jun 13 16:21:13 2016 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Jun 13 16:21:13 2016 +0800

----------------------------------------------------------------------
 ios/playground/WeexDemo/Scanner/WXScannerVC.m | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0b308aab/ios/playground/WeexDemo/Scanner/WXScannerVC.m
----------------------------------------------------------------------
diff --git a/ios/playground/WeexDemo/Scanner/WXScannerVC.m b/ios/playground/WeexDemo/Scanner/WXScannerVC.m
index fcf5e60..a29e1b7 100644
--- a/ios/playground/WeexDemo/Scanner/WXScannerVC.m
+++ b/ios/playground/WeexDemo/Scanner/WXScannerVC.m
@@ -72,13 +72,10 @@
 {
     [_captureLayer removeFromSuperlayer];
     [_session stopRunning];
-    if (!_opened) {
-        AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
-        _opened = YES;
-        if (metadataObjects.count > 0) {
-            AVMetadataMachineReadableCodeObject * metadataObject = [metadataObjects objectAtIndex : 0 ];
-            [self openURL:metadataObject.stringValue];
-        }
+    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
+    if (metadataObjects.count > 0) {
+        AVMetadataMachineReadableCodeObject * metadataObject = [metadataObjects objectAtIndex : 0 ];
+        [self openURL:metadataObject.stringValue];
     }
 }