From 43d72912cb3c42ba1e6b864943046f9528567614 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Fri, 25 May 2018 14:48:46 +0300 Subject: [PATCH] [#3414] --- .../ui/screens/wallet/choose_recipient/views.cljs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/status_im/ui/screens/wallet/choose_recipient/views.cljs b/src/status_im/ui/screens/wallet/choose_recipient/views.cljs index 32c3cebfce8..91fa601da1c 100644 --- a/src/status_im/ui/screens/wallet/choose_recipient/views.cljs +++ b/src/status_im/ui/screens/wallet/choose_recipient/views.cljs @@ -44,9 +44,9 @@ (int (* 2 (/ (min height width) 3)))) (defview choose-recipient [] - (letsubs [dimensions (react/get-dimensions "window") - camera-flashlight [:wallet.send/camera-flashlight] - view [:get :view-id]] + (letsubs [read-once? (atom false) + dimensions (react/get-dimensions "window") + camera-flashlight [:wallet.send/camera-flashlight]] [react/view {:style styles/qr-code} [status-bar/status-bar {:type :transparent}] [toolbar-view camera-flashlight] @@ -61,7 +61,9 @@ :aspect :fill :captureAudio false :torchMode (camera/set-torch camera-flashlight) - :onBarCodeRead #(re-frame/dispatch [:wallet/fill-request-from-url (camera/get-qr-code-data %) nil])}]] + :onBarCodeRead #(when-not @read-once? + (reset! read-once? true) + (re-frame/dispatch [:wallet/fill-request-from-url (camera/get-qr-code-data %) nil]))}]] [viewfinder dimensions (size dimensions)]] [bottom-buttons/bottom-button [button/button {:disabled? false