From 3409ccab2714aeb73cdc2533b9327f3e8c0ece48 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 23 Aug 2021 12:50:39 +0300 Subject: [PATCH] [#12467] Remove default action icon in message actions list --- src/status_im/ui/screens/chat/message/message.cljs | 4 ++++ src/status_im/ui/screens/chat/message/reactions_picker.cljs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/status_im/ui/screens/chat/message/message.cljs b/src/status_im/ui/screens/chat/message/message.cljs index aa5494ed11..1861e3aab2 100644 --- a/src/status_im/ui/screens/chat/message/message.cljs +++ b/src/status_im/ui/screens/chat/message/message.cljs @@ -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]) 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 cd65ba050b..730cdf492c 100644 --- a/src/status_im/ui/screens/chat/message/reactions_picker.cljs +++ b/src/status_im/ui/screens/chat/message/reactions_picker.cljs @@ -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