From fad1bd25c0719ab8dd41ba2ca5b70ca6a9e62e07 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 6 Jul 2020 08:50:13 +0200 Subject: [PATCH] chill stickers Signed-off-by: andrey --- src/status_im/ui/screens/chat/stickers/views.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/ui/screens/chat/stickers/views.cljs b/src/status_im/ui/screens/chat/stickers/views.cljs index dd039780a8..ce92b9b0d7 100644 --- a/src/status_im/ui/screens/chat/stickers/views.cljs +++ b/src/status_im/ui/screens/chat/stickers/views.cljs @@ -10,7 +10,8 @@ [status-im.ui.screens.chat.stickers.styles :as styles] [status-im.ui.components.animation :as anim] [status-im.utils.contenthash :as contenthash] - [status-im.utils.platform :as platform])) + [status-im.utils.platform :as platform] + [status-im.utils.debounce :as debounce])) (def icon-size 28) (def icon-horizontal-margin 8) @@ -48,7 +49,7 @@ (for [{:keys [hash] :as sticker} stickers] ^{:key (str hash)} [react/touchable-highlight {:style {:height 75 :width 75 :margin 5} - :on-press #(re-frame/dispatch [:chat/send-sticker sticker])} + :on-press #(debounce/dispatch-and-chill [:chat/send-sticker sticker] 1000)} [react/image {:style {:resize-mode :cover :width "100%" :height "100%"} :accessibility-label :sticker-icon :source {:uri (contenthash/url (str "0x" hash))}}]])]]])