Add Images count to reply (#16194)
* fix: images reply count --------- Co-authored-by: pavloburykh <pavlo@status.im>
This commit is contained in:
parent
43ffe74a9c
commit
a5455739c6
|
@ -55,10 +55,11 @@
|
|||
(update :link-previews #(map <-link-preview-rpc %))
|
||||
(update :quoted-message
|
||||
set/rename-keys
|
||||
{:parsedText :parsed-text
|
||||
:deleted :deleted?
|
||||
:deletedForMe :deleted-for-me?
|
||||
:communityId :community-id})
|
||||
{:parsedText :parsed-text
|
||||
:deleted :deleted?
|
||||
:deletedForMe :deleted-for-me?
|
||||
:communityId :community-id
|
||||
:albumImagesCount :album-images-count})
|
||||
(update :outgoing-status keyword)
|
||||
(update :command-parameters
|
||||
set/rename-keys
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
(ns status-im2.contexts.chat.composer.reply.style)
|
||||
(ns status-im2.contexts.chat.composer.reply.style
|
||||
(:require [react-native.platform :as platform]))
|
||||
|
||||
|
||||
(defn container
|
||||
[pin? in-chat-input?]
|
||||
{:flex-direction :row
|
||||
:height (when-not pin? 24)
|
||||
:margin-left (when (and (not in-chat-input?) (not pin?)) 26)
|
||||
:margin-left (if (and (not in-chat-input?) (not pin?)) 26 (if platform/android? 4 0))
|
||||
:margin-bottom (when (and (not in-chat-input?) (not pin?)) 8)})
|
||||
(defn reply-content
|
||||
[pin?]
|
||||
|
@ -33,7 +34,7 @@
|
|||
{:text-transform :none
|
||||
:margin-left 4
|
||||
:margin-top 2
|
||||
:flex 1})
|
||||
:flex-shrink 1})
|
||||
|
||||
(def gradient
|
||||
{:position :absolute
|
||||
|
|
|
@ -84,7 +84,8 @@
|
|||
in-chat-input? pin? recording-audio?]
|
||||
(let [contact-name (rf/sub [:contacts/contact-name-by-identity from])
|
||||
current-public-key (rf/sub [:multiaccount/public-key])
|
||||
content-type (or content-type contentType)]
|
||||
content-type (or content-type contentType)
|
||||
text (get-quoted-text-with-mentions (or parsed-text (:parsed-text content)))]
|
||||
[rn/view
|
||||
{:style (style/container pin? in-chat-input?)
|
||||
:accessibility-label :reply-message}
|
||||
|
@ -102,26 +103,30 @@
|
|||
{:from from
|
||||
:contact-name contact-name
|
||||
:current-public-key current-public-key}]
|
||||
(when (not-empty text)
|
||||
[quo/text
|
||||
{:number-of-lines 1
|
||||
:size :label
|
||||
:weight :regular
|
||||
:accessibility-label :quoted-message
|
||||
:ellipsize-mode :tail
|
||||
:style style/message-text}
|
||||
text])
|
||||
[quo/text
|
||||
{:number-of-lines 1
|
||||
:size :label
|
||||
:weight :regular
|
||||
:accessibility-label :quoted-message
|
||||
:ellipsize-mode :tail
|
||||
:style (merge
|
||||
style/message-text
|
||||
(when (or (= constant/content-type-image content-type)
|
||||
(= constant/content-type-sticker content-type)
|
||||
(= constant/content-type-audio content-type))
|
||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}))}
|
||||
(case (or content-type contentType)
|
||||
constant/content-type-image (if album-images-count
|
||||
(i18n/label :t/images-albums-count
|
||||
{:album-images-count album-images-count})
|
||||
(i18n/label :t/image))
|
||||
constant/content-type-sticker (i18n/label :t/sticker)
|
||||
constant/content-type-audio (i18n/label :t/audio)
|
||||
(get-quoted-text-with-mentions (or parsed-text (:parsed-text content))))]])]
|
||||
{:size :label
|
||||
:weight :regular
|
||||
:style {:color (colors/theme-colors colors/neutral-50 colors/neutral-40)
|
||||
:margin-top 2}}
|
||||
(str " "
|
||||
(case (or content-type contentType)
|
||||
constant/content-type-image (if (pos? album-images-count)
|
||||
(i18n/label :t/album-images-count
|
||||
{:album-images-count album-images-count})
|
||||
(i18n/label :t/photo))
|
||||
constant/content-type-sticker (i18n/label :t/sticker)
|
||||
constant/content-type-audio (i18n/label :t/audio)
|
||||
""))]
|
||||
])]
|
||||
(when (and in-chat-input? (not recording-audio?))
|
||||
[quo/button
|
||||
{:width 24
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.154.5",
|
||||
"commit-sha1": "92b5d831fe25fd2b0397519a1073a53e0be87289",
|
||||
"src-sha256": "004pm4k090lw35kbfag0wjs815y68k61h3g6kydzpzkbmxrrfzd9"
|
||||
"version": "0.155.1",
|
||||
"commit-sha1": "1d4fa29f8e96a8b54547ea95d477b943b507205d",
|
||||
"src-sha256": "1srn32r2lbqv18abp1zgh4ii8yyw9xm9y5rp8hiq4knb830y301r"
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ class ChatView(BaseView):
|
|||
self.url_preview_composer = Button(self.driver, accessibility_id="url-preview")
|
||||
self.url_preview_composer_text = Text(self.driver, xpath='//*[@content-desc="url-preview"]//*[@content-desc="title"]')
|
||||
self.quote_username_in_message_input = EditBox(self.driver,
|
||||
xpath="//*[@content-desc='reply-cancel-button']/preceding::android.widget.TextView[2]")
|
||||
xpath="//*[@content-desc='reply-cancel-button']/preceding::android.widget.TextView[3]")
|
||||
self.chat_item = Button(self.driver, xpath="(//*[@content-desc='chat-item'])[1]")
|
||||
self.chat_name_editbox = EditBox(self.driver, accessibility_id="chat-name-input")
|
||||
self.commands_button = CommandsButton(self.driver)
|
||||
|
|
|
@ -1575,6 +1575,7 @@
|
|||
"one-photo": "1 photo",
|
||||
"n-photos": "{{count}} photos",
|
||||
"image": "Image",
|
||||
"photo": "Photo",
|
||||
"sign-anyway": "Sign anyway",
|
||||
"tx-fail-description1": "This transaction is likely to fail. Sign at your own risk using custom network fee.",
|
||||
"tx-fail-description2": "This transaction is likely to fail. Set a custom network fee to sign at your own risk.",
|
||||
|
@ -2052,7 +2053,7 @@
|
|||
"you-have-no-contacts": "You have no contacts",
|
||||
"my-albums": "My albums",
|
||||
"images": "images",
|
||||
"images-albums-count": "{{album-images-count}} images",
|
||||
"album-images-count": "{{album-images-count}} photos",
|
||||
"only-6-images": "You can only add 6 images to your message",
|
||||
"delivered": "Delivered",
|
||||
"mark-all-notifications-as-read": "Mark all notifications as read",
|
||||
|
|
Loading…
Reference in New Issue