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
(: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