diff --git a/src/quo2/components/notifications/activity_logs_photos/view.cljs b/src/quo2/components/notifications/activity_logs_photos/view.cljs index 9500d52ebced..63a812fff205 100644 --- a/src/quo2/components/notifications/activity_logs_photos/view.cljs +++ b/src/quo2/components/notifications/activity_logs_photos/view.cljs @@ -1,19 +1,19 @@ (ns quo2.components.notifications.activity-logs-photos.view (:require [react-native.core :as rn] - [quo2.components.markdown.text :as quo2.text] + [quo2.components.markdown.text :as text] [quo2.components.notifications.activity-logs-photos.style :as style])) (defn view - [{:keys [photos text]}] + [{:keys [photos message-text]}] [:<> - (when (seq text) - [quo2.text/text + (when (seq message-text) + [text/text {:size :paragraph-1 :weight :regular :style style/text :number-of-lines 2 :accessibility-label :activity-log-title} - text]) + message-text]) [rn/view {:style style/photos-container} (map-indexed (fn [index photo] diff --git a/src/status_im/data_store/activities.cljs b/src/status_im/data_store/activities.cljs index 57f8af6dd900..4a2e70f53de8 100644 --- a/src/status_im/data_store/activities.cljs +++ b/src/status_im/data_store/activities.cljs @@ -61,7 +61,8 @@ :chatId :chat-id :contactVerificationStatus :contact-verification-status :communityId :community-id - :membershipStatus :membership-status}) + :membershipStatus :membership-status + :albumMessages :album-messages}) (update :last-message #(when % (messages/<-rpc %))) (update :message #(when % (messages/<-rpc %))) (update :reply-message #(when % (messages/<-rpc %))) diff --git a/src/status_im2/contexts/shell/activity_center/notification/reply/view.cljs b/src/status_im2/contexts/shell/activity_center/notification/reply/view.cljs index 0f3570dbfe75..842d63d99a0b 100644 --- a/src/status_im2/contexts/shell/activity_center/notification/reply/view.cljs +++ b/src/status_im2/contexts/shell/activity_center/notification/reply/view.cljs @@ -14,23 +14,22 @@ ;; NOTE: Replies support text, image and stickers only. (defn- get-message-content - [{:keys [content-type] :as message} albumMessages] + [{:keys [content-type] :as message} album-messages] (case content-type constants/content-type-text [quo/text {:style style/tag-text} (get-in message [:content :text])] constants/content-type-image - (let [images (or albumMessages message) - image-urls (if albumMessages + (let [images (or album-messages message) + image-urls (if album-messages (mapv #(get % :image) images) [(get-in message [:content :image])]) image-local-urls (mapv (fn [url] {:uri (url/replace-port url (rf/sub [:mediaserver/port]))}) - image-urls) - photos (when image-local-urls image-local-urls)] + image-urls)] [quo/activity-logs-photos - {:photos photos - :text (get-in message [:content :text])}]) + {:photos image-local-urls + :message-text (get-in message [:content :text])}]) constants/content-type-sticker [old-message/sticker message] @@ -61,11 +60,11 @@ (defn view [{:keys [notification set-swipeable-height customization-color] :as props}] (let [{:keys [author chat-name community-id chat-id - message read timestamp albumMessages]} notification - community-chat? (not (string/blank? community-id)) - community (rf/sub [:communities/community community-id]) - community-name (:name community) - community-image (get-in community [:images :thumbnail :uri])] + message read timestamp album-messages]} notification + community-chat? (not (string/blank? community-id)) + community (rf/sub [:communities/community community-id]) + community-name (:name community) + community-image (get-in community [:images :thumbnail :uri])] [swipeable props [gesture/touchable-without-feedback {:on-press (fn [] @@ -113,4 +112,4 @@ :else nil) - :body (get-message-content message albumMessages)}}]]])) + :body (get-message-content message album-messages)}}]]]))