From 1e7061acc2b95995f17ea1b4119611123272c47c Mon Sep 17 00:00:00 2001 From: Gheorghe Pinzaru Date: Tue, 18 Aug 2020 10:02:40 +0300 Subject: [PATCH] Fix topbar in new contact Fixes #11091 Fix more nav handlers keys Signed-off-by: Gheorghe Pinzaru --- .../ui/screens/add_new/new_chat/views.cljs | 25 ++++++++++--------- src/status_im/ui/screens/intro/password.cljs | 2 +- .../ui/screens/wallet/add_new/views.cljs | 4 +-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/status_im/ui/screens/add_new/new_chat/views.cljs b/src/status_im/ui/screens/add_new/new_chat/views.cljs index e450ccb298..43aafc830f 100644 --- a/src/status_im/ui/screens/add_new/new_chat/views.cljs +++ b/src/status_im/ui/screens/add_new/new_chat/views.cljs @@ -64,13 +64,13 @@ {:keys [state ens-name public-key error]} [:contacts/new-identity]] [react/view {:style {:flex 1}} [topbar/topbar - {:title (i18n/label :t/new-chat) - :modal? true + {:title (i18n/label :t/new-chat) + :modal? true :right-accessories [{:icon :qr :accessibility-label :scan-contact-code-button - :handler #(re-frame/dispatch [::qr-scanner/scan-code - {:title (i18n/label :t/new-contact) + :on-press #(re-frame/dispatch [::qr-scanner/scan-code + {:title (i18n/label :t/new-chat) :handler :contact/qr-code-scanned}])}]}] [react/view {:flex-direction :row :padding 16} @@ -113,14 +113,15 @@ (views/letsubs [{:keys [state ens-name public-key error]} [:contacts/new-identity]] [react/view {:style {:flex 1}} [topbar/topbar - {:title :t/new-contact - :modal? true - :accessories [{:icon :qr - :accessibility-label :scan-contact-code-button - :handler #(re-frame/dispatch [::qr-scanner/scan-code - {:title (i18n/label :t/new-contact) - :handler :contact/qr-code-scanned - :new-contact? true}])}]}] + {:title (i18n/label :t/new-contact) + :modal? true + :right-accessories + [{:icon :qr + :accessibility-label :scan-contact-code-button + :on-press #(re-frame/dispatch [::qr-scanner/scan-code + {:title (i18n/label :t/new-contact) + :handler :contact/qr-code-scanned + :new-contact? true}])}]}] [react/view {:flex-direction :row :padding 16} [react/view {:flex 1 diff --git a/src/status_im/ui/screens/intro/password.cljs b/src/status_im/ui/screens/intro/password.cljs index 41d843383d..46bdbd735c 100644 --- a/src/status_im/ui/screens/intro/password.cljs +++ b/src/status_im/ui/screens/intro/password.cljs @@ -37,7 +37,7 @@ :navigation {:icon :main-icons/back :accessibility-label :back-button - :handler #(re-frame/dispatch [:intro-wizard/navigate-back])}}] + :on-press #(re-frame/dispatch [:intro-wizard/navigate-back])}}] [rn/view {:style {:flex 1 :justify-content :space-between :padding-vertical 16 diff --git a/src/status_im/ui/screens/wallet/add_new/views.cljs b/src/status_im/ui/screens/wallet/add_new/views.cljs index c92eb28af7..fa11d7927d 100644 --- a/src/status_im/ui/screens/wallet/add_new/views.cljs +++ b/src/status_im/ui/screens/wallet/add_new/views.cljs @@ -30,8 +30,8 @@ (when (= type :watch) {:right-accessories [{:icon :qr - :handler #(re-frame/dispatch [:wallet.add-new/qr-scanner - {:handler :wallet.add-new/qr-scanner-result}])}]}))])) + :on-press #(re-frame/dispatch [:wallet.add-new/qr-scanner + {:handler :wallet.add-new/qr-scanner-result}])}]}))])) (defn common-settings [account] [react/view {:margin-horizontal 16}