From 5e1bd9ff48c0b0c9ad72aac07ddfe2c570a945d4 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 21 Apr 2020 18:00:51 -0400 Subject: [PATCH] fix: add debounce to "Done" button in the recipient selection dialog Signed-off-by: Andrey Shovkoplyas --- src/status_im/ui/screens/wallet/components/views.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs index 4af384ee66..6b4c155370 100644 --- a/src/status_im/ui/screens/wallet/components/views.cljs +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -8,7 +8,8 @@ [status-im.ui.components.toolbar.view :as topbar] [status-im.ui.screens.wallet.components.styles :as styles] [status-im.ui.components.text-input.view :as text-input] - [status-im.ui.components.colors :as colors]) + [status-im.ui.components.colors :as colors] + [status-im.utils.debounce :as debounce]) (:require-macros [status-im.utils.views :as views])) (defn separator [] @@ -27,7 +28,7 @@ [topbar/text-action {:disabled? (string/blank? content) :style {:margin-right 16} - :handler #(re-frame/dispatch [:wallet.send/set-recipient content])} + :handler #(debounce/dispatch-and-chill [:wallet.send/set-recipient content] 3000)} (i18n/label :t/done)]]) (views/defview contact-code []