From 6c135e25708331ee59eb81920e9fecb16fcd7062 Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Mon, 19 Sep 2022 16:04:02 +0800 Subject: [PATCH] fix: remove annoying deref in lazy seq warning (#14033) --- .../chat/message/reactions_picker.cljs | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/status_im/ui/screens/chat/message/reactions_picker.cljs b/src/status_im/ui/screens/chat/message/reactions_picker.cljs index b0ab9d53d4..ad3a511a96 100644 --- a/src/status_im/ui/screens/chat/message/reactions_picker.cljs +++ b/src/status_im/ui/screens/chat/message/reactions_picker.cljs @@ -1,14 +1,14 @@ (ns status-im.ui.screens.chat.message.reactions-picker (:require [cljs-bean.core :as bean] - [status-im.ui.screens.chat.message.styles :as styles] - [status-im.ui.components.icons.icons :as icons] - [status-im.constants :as constants] - [reagent.core :as reagent] - [quo.react-native :as rn] - [quo.react :as react] [quo.animated :as animated] [quo.components.safe-area :as safe-area] - [quo.core :as quo])) + [quo.core :as quo] + [quo.react :as react] + [quo.react-native :as rn] + [reagent.core :as reagent] + [status-im.constants :as constants] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.screens.chat.message.styles :as styles])) (def tabbar-height 36) (def text-input-height 54) @@ -44,18 +44,19 @@ :width 32}}]]]))] (when (seq actions) [rn/view {:style (styles/quick-actions-container)} - (for [action actions - :let [{:keys [id label on-press]} (bean/bean action)]] - ^{:key id} - [rn/touchable-opacity {:on-press (fn [] - (on-close) - (js/setTimeout on-press animation-duration))} - [rn/view {:style (styles/quick-actions-row)} - [quo/text {:color (if (= id "delete") :negative :link) - :weight :medium} label] - (when-let [icon (get id-icon id)] - [icons/icon icon - {:color (if (= id "delete") :red :blue)}])]])])]) + (doall + (for [action actions + :let [{:keys [id label on-press]} (bean/bean action)]] + ^{:key id} + [rn/touchable-opacity {:on-press (fn [] + (on-close) + (js/setTimeout on-press animation-duration))} + [rn/view {:style (styles/quick-actions-row)} + [quo/text {:color (if (= id "delete") :negative :link) + :weight :medium} label] + (when-let [icon (get id-icon id)] + [icons/icon icon + {:color (if (= id "delete") :red :blue)}])]]))])]) (def modal (reagent/adapt-react-class