Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/User is not redirected to previous screen after scanning wallet QR code. [#3414] #4454

Merged
merged 1 commit into from May 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/status_im/ui/screens/wallet/choose_recipient/views.cljs
Expand Up @@ -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]
Expand All @@ -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
Expand Down