share image messages to other apps

Signed-off-by: jo-mut <johnmutuku628@gmail.com>
This commit is contained in:
jo-mut 2022-05-13 20:13:16 +03:00
parent 43f7aaf8b1
commit b9f7e8758d
No known key found for this signature in database
GPG Key ID: 69A1DD66D15D23AB
2 changed files with 8 additions and 1 deletions

View File

@ -24,6 +24,7 @@
[status-im.ui.screens.chat.message.link-preview :as link-preview] [status-im.ui.screens.chat.message.link-preview :as link-preview]
[status-im.ui.screens.communities.icon :as communities.icon] [status-im.ui.screens.communities.icon :as communities.icon]
[status-im.ui.components.animation :as animation] [status-im.ui.components.animation :as animation]
[status-im.chat.models.images :as images]
[status-im.chat.models.pin-message :as models.pin-message]) [status-im.chat.models.pin-message :as models.pin-message])
(:require-macros [status-im.utils.views :refer [defview letsubs]])) (:require-macros [status-im.utils.views :refer [defview letsubs]]))
@ -586,7 +587,11 @@
:label (i18n/label :t/message-reply)} :label (i18n/label :t/message-reply)}
{: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
:label (i18n/label :t/save)}] :label (i18n/label :t/save)}
{:on-press #(images/download-image-http
(get-in message [:content :image]) preview/share)
:id :share
:label (i18n/label :t/share)}]
(when (and outgoing config/delete-message-enabled?) (when (and outgoing config/delete-message-enabled?)
[{: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) :label (i18n/label :t/delete)

View File

@ -25,6 +25,8 @@
"unpin" :main-icons/pin "unpin" :main-icons/pin
"copy" :main-icons/copy "copy" :main-icons/copy
"reply" :main-icons/reply "reply" :main-icons/reply
"save" :main-icons/download
"share" :main-icons/share-default
"delete" :main-icons/delete}) "delete" :main-icons/delete})
(defn picker [{:keys [outgoing actions own-reactions on-close send-emoji timeline]}] (defn picker [{:keys [outgoing actions own-reactions on-close send-emoji timeline]}]