Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Apr 12, 2023
1 parent 4cf1633 commit c226864
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 11 additions & 4 deletions src/status_im2/contexts/chat/home/chat_list_item/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
[status-im2.constants :as constants]
[taoensso.timbre :as log]
[reagent.core :as reagent]
[utils.i18n :as i18n]))
[utils.i18n :as i18n]
[status-im2.contexts.chat.messages.content.album.view :as album]))

;status-im2.subs.chat.chats

Expand Down Expand Up @@ -59,7 +60,7 @@
(rf/dispatch [:pin-message/load-pin-messages chat-id]))

:reagent-render
(fn [chat-id {:keys [content-type content outgoing] :as message}]
(fn [chat-id {:keys [content-type content outgoing album-images-count] :as message}]
(let [{:keys [response-to]} content
content-text (extract-text-from-message message)
preview-text (case content-type
Expand Down Expand Up @@ -87,8 +88,14 @@

constants/content-type-image
(if outgoing
(i18n/label :t/you-sent-a-photo)
(i18n/label :t/sent-a-photo))
(if album-images-count
(i18n/label :t/you-sent-n-photos {:number album-images-count})
(i18n/label :t/you-sent-a-photo))

(if album-images-count
(i18n/label :t/sent-n-photos {:number album-images-count})
(i18n/label :t/sent-a-photo)))


constants/content-type-audio
(if outgoing
Expand Down
4 changes: 2 additions & 2 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"owner": "status-im",
"repo": "status-go",
"version": "chat_preview_fields",
"commit-sha1": "07c7adf8eb41d9fcf34564c97b130d58626b297b",
"src-sha256": "0g73zj9ilsj5lfq7005ldx4avvidkcbj9x36b7lr1j1zwcmhlf05"
"commit-sha1": "dc27f49857ee8589f82af3009623b7abeba230a6",
"src-sha256": "1sm8k86ff90705lja4k8v5j7idhvak9z2wqnjbk7h3m8iwbcxifc"
}
2 changes: 2 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,8 @@
"sent-a-sticker": "Sent a sticker",
"you-sent-a-photo": "You sent a photo",
"sent-a-photo": "Sent a photo",
"you-sent-n-photos": "You sent {{number}} photos",
"sent-n-photos": "Sent {{number}} photos",
"you-sent-audio-message": "You sent an audio message",
"sent-audio-message": "Sent an audio message",
"you-sent-a-gif": "You sent a GIF",
Expand Down

0 comments on commit c226864

Please sign in to comment.