fix: add debounce to "Done" button in the recipient selection dialog

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Richard Ramos 2020-04-21 18:00:51 -04:00 committed by Andrey Shovkoplyas
parent 38125173cb
commit 5e1bd9ff48
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 3 additions and 2 deletions

View File

@ -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 []