fix: remove annoying deref in lazy seq warning (#14033)

This commit is contained in:
yqrashawn 2022-09-19 16:04:02 +08:00 committed by GitHub
parent 8b809ec1bc
commit 6c135e2570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 19 deletions

View File

@ -1,14 +1,14 @@
(ns status-im.ui.screens.chat.message.reactions-picker (ns status-im.ui.screens.chat.message.reactions-picker
(:require [cljs-bean.core :as bean] (: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.animated :as animated]
[quo.components.safe-area :as safe-area] [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 tabbar-height 36)
(def text-input-height 54) (def text-input-height 54)
@ -44,18 +44,19 @@
:width 32}}]]]))] :width 32}}]]]))]
(when (seq actions) (when (seq actions)
[rn/view {:style (styles/quick-actions-container)} [rn/view {:style (styles/quick-actions-container)}
(for [action actions (doall
:let [{:keys [id label on-press]} (bean/bean action)]] (for [action actions
^{:key id} :let [{:keys [id label on-press]} (bean/bean action)]]
[rn/touchable-opacity {:on-press (fn [] ^{:key id}
(on-close) [rn/touchable-opacity {:on-press (fn []
(js/setTimeout on-press animation-duration))} (on-close)
[rn/view {:style (styles/quick-actions-row)} (js/setTimeout on-press animation-duration))}
[quo/text {:color (if (= id "delete") :negative :link) [rn/view {:style (styles/quick-actions-row)}
:weight :medium} label] [quo/text {:color (if (= id "delete") :negative :link)
(when-let [icon (get id-icon id)] :weight :medium} label]
[icons/icon icon (when-let [icon (get id-icon id)]
{:color (if (= id "delete") :red :blue)}])]])])]) [icons/icon icon
{:color (if (= id "delete") :red :blue)}])]]))])])
(def modal (def modal
(reagent/adapt-react-class (reagent/adapt-react-class