Skip to content

Commit

Permalink
ios
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Mar 29, 2019
1 parent 1ad3bf5 commit b58a82c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/status_im/ui/screens/qr_scanner/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[status-im.ui.components.status-bar.view :as status-bar]
[status-im.ui.components.toolbar.view :as toolbar]
[status-im.ui.screens.qr-scanner.styles :as styles]
[status-im.ui.components.toolbar.actions :as actions]))
[status-im.ui.components.toolbar.actions :as actions]
[status-im.utils.platform :as platform]))

(defview qr-scanner-toolbar [title identifier]
[react/view
Expand All @@ -29,7 +30,12 @@
barcode-read? (reagent/atom false)]
[react/view styles/barcode-scanner-container
[qr-scanner-toolbar (or (:toolbar-title identifier) (i18n/label :t/scan-qr)) identifier]
[react/view {:height 64}]
;;TODO(rasom): Find a better way to fix this.
;; For unknown reason camera/camera view hovers the previous view
;; on Android. :margin-top doesn't fix the issue, so the only way i found
;; was to add another view before camera/camera ¯\_(ツ)_/¯
(when platform/android?
[react/view {:height 64}])
[camera/camera {:onBarCodeRead #(if (:multiple? identifier)
(on-barcode-read identifier %)
(when-not @barcode-read?
Expand Down

0 comments on commit b58a82c

Please sign in to comment.