[#12467] Remove default action icon in message actions list

This commit is contained in:
Roman Volosovskyi 2021-08-23 12:50:39 +03:00
parent 37d893d5f8
commit 3409ccab27
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 7 additions and 3 deletions

View File

@ -494,8 +494,10 @@
(on-long-press
(concat
[{:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message])
:id :reply
:label (i18n/label :t/message-reply)}
{:on-press #(react/copy-to-clipboard (get content :text))
:id :copy
:label (i18n/label :t/sharing-copy-to-clipboard)}]
(when message-pin-enabled [{:on-press #(pin-message message)
:label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin))}]))))})
@ -544,8 +546,10 @@
:on-long-press (fn []
(on-long-press
[{:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message])
:id :reply
:label (i18n/label :t/message-reply)}
{:on-press #(re-frame/dispatch [:chat.ui/save-image-to-gallery (:image content)])
:id :save
:label (i18n/label :t/save)}]))}]
reaction-picker])

View File

@ -51,9 +51,9 @@
[rn/view {:style (styles/quick-actions-row)}
[quo/text {:color (if (= id "delete") :negative :link)
:weight :medium} label]
;; fallback to warning icon if id to icon mapping is not defined
[icons/icon (get id-icon id :main-icons/warning)
{:color (if (= id "delete") :red :blue)}]]])])])
(when-let [icon (get id-icon id)]
[icons/icon icon
{:color (if (= id "delete") :red :blue)}])]])])])
(def modal
(reagent/adapt-react-class