[#14311] Fix icons in message actions bottom sheet

This commit is contained in:
Roman Volosovskyi 2022-11-15 10:44:08 +01:00
parent f408035f5e
commit 48f86ff862
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE

View File

@ -505,17 +505,17 @@
[{:type :main [{:type :main
:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message]) :on-press #(re-frame/dispatch [:chat.ui/reply-to-message message])
:id :reply :id :reply
:icon :i/reply-context20 :icon :i/reply
:label (i18n/label :t/message-reply)} :label (i18n/label :t/message-reply)}
{:type :main {:type :main
:on-press #(react/copy-to-clipboard (get content :text)) :on-press #(react/copy-to-clipboard (get content :text))
:id :copy :id :copy
:icon :i/copy-context20 :icon :i/copy
:label (i18n/label :t/copy-text)}] :label (i18n/label :t/copy-text)}]
(when message-pin-enabled [{:type :main (when message-pin-enabled [{:type :main
:on-press #(pin-message message) :on-press #(pin-message message)
:id :pin :id :pin
:icon :i/pin-context20 :icon :i/pin
:label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin))}]))))] :label (if pinned (i18n/label :t/unpin) (i18n/label :t/pin))}]))))]
(reset! ref on-long-press) (reset! ref on-long-press)
[message-content-wrapper message [message-content-wrapper message
@ -546,7 +546,7 @@
(on-long-press (on-long-press
(when-not outgoing (when-not outgoing
[{:type :main [{:type :main
:icon :i/stickers-context20 :icon :i/stickers
:on-press #(when pack :on-press #(when pack
(re-frame/dispatch [:chat.ui/show-profile from])) (re-frame/dispatch [:chat.ui/show-profile from]))
:label (i18n/label :t/see-sticker-set)}])))] :label (i18n/label :t/see-sticker-set)}])))]
@ -574,31 +574,31 @@
(concat [{:type :main (concat [{:type :main
:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message]) :on-press #(re-frame/dispatch [:chat.ui/reply-to-message message])
:id :reply :id :reply
:icon :i/reply-context20 :icon :i/reply
:label (i18n/label :t/message-reply)} :label (i18n/label :t/message-reply)}
{:type :main {:type :main
:on-press #(re-frame/dispatch [:chat.ui/save-image-to-gallery (:image content)]) :on-press #(re-frame/dispatch [:chat.ui/save-image-to-gallery (:image content)])
:id :save :id :save
:icon :i/save-context20 :icon :i/save
:label (i18n/label :t/save-image-library)} :label (i18n/label :t/save-image-library)}
{:type :main {:type :main
:on-press #(images/download-image-http :on-press #(images/download-image-http
(get-in message [:content :image]) preview/share) (get-in message [:content :image]) preview/share)
:id :share :id :share
:icon :i/share-context20 :icon :i/share
:label (i18n/label :t/share-image)}] :label (i18n/label :t/share-image)}]
[{:type :danger [{:type :danger
:on-press #(re-frame/dispatch :on-press #(re-frame/dispatch
[:chat.ui/delete-message-for-me message [:chat.ui/delete-message-for-me message
constants/delete-message-for-me-undo-time-limit-ms]) constants/delete-message-for-me-undo-time-limit-ms])
:label (i18n/label :t/delete-for-me) :label (i18n/label :t/delete-for-me)
:icon :i/delete-context20 :icon :i/delete
:id :delete-for-me}] :id :delete-for-me}]
(when (and outgoing config/delete-message-enabled?) (when (and outgoing config/delete-message-enabled?)
[{:type :danger [{:type :danger
:on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message]) :on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message])
:label (i18n/label :t/delete-for-everyone) :label (i18n/label :t/delete-for-everyone)
:icon :i/delete-context20 :icon :i/delete
:id :delete}]))))] :id :delete}]))))]
(reset! ref on-long-press) (reset! ref on-long-press)
[message-content-wrapper message [message-content-wrapper message
@ -622,20 +622,20 @@
{:type :main {:type :main
:on-press #(pin-message message) :on-press #(pin-message message)
:label (i18n/label (if pinned :t/unpin-from-chat :t/pin-to-chat)) :label (i18n/label (if pinned :t/unpin-from-chat :t/pin-to-chat))
:icon :i/pin-context20 :icon :i/pin
:id (if pinned :unpin :pin)} :id (if pinned :unpin :pin)}
{:type :danger {:type :danger
:on-press #(re-frame/dispatch :on-press #(re-frame/dispatch
[:chat.ui/delete-message-for-me message [:chat.ui/delete-message-for-me message
constants/delete-message-for-me-undo-time-limit-ms]) constants/delete-message-for-me-undo-time-limit-ms])
:label (i18n/label :t/delete-for-me) :label (i18n/label :t/delete-for-me)
:icon :i/delete-context20 :icon :i/delete
:id :delete-for-me} :id :delete-for-me}
(when (and outgoing config/delete-message-enabled?) (when (and outgoing config/delete-message-enabled?)
{:type :danger {:type :danger
:on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message]) :on-press #(re-frame/dispatch [:chat.ui/soft-delete-message message])
:label (i18n/label :t/delete-for-everyone) :label (i18n/label :t/delete-for-everyone)
:icon :i/delete-context20 :icon :i/delete
:id :delete})]))] :id :delete})]))]
(reset! ref on-long-press) (reset! ref on-long-press)
[message-content-wrapper message [message-content-wrapper message