Fix icon for replies and mentions

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Brian Sztamfater 2021-07-29 15:14:36 -03:00 committed by Andrea Maria Piana
parent 5c29ea38ea
commit deb88cbc71
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 18 additions and 7 deletions

View File

@ -6,6 +6,8 @@
[status-im.i18n.i18n :as i18n]
[status-im.ui.screens.notifications-center.styles :as styles]
[status-im.utils.handlers :refer [<sub]]
[status-im.ui.screens.chat.photos :as photos]
[status-im.multiaccounts.core :as multiaccounts]
[status-im.ui.components.icons.icons :as icons]
[status-im.utils.contenthash :as contenthash]
[status-im.constants :as constants]
@ -117,16 +119,25 @@
message (or message last-message)
{:keys [community-id]} (<sub [:chat-by-id chat-id])
{:keys [name]} @(re-frame/subscribe [:communities/community community-id])
contact (when message @(re-frame/subscribe [:contacts/contact-by-identity (message :from)]))
sender (when message (first @(re-frame/subscribe [:contacts/contact-two-names-by-identity (message :from)])))]
[react/touchable-opacity (merge {:style (styles/notification-container read)} opts)
[react/view {:style styles/notification-content-container}
(if (or
(= type constants/activity-center-notification-type-mention)
(= type constants/activity-center-notification-type-reply))
[react/view {:style styles/photo-container}
[photos/photo
(multiaccounts/displayed-photo contact)
{:size 40
:accessibility-label :current-account-photo}]]
[chat-icon.screen/chat-icon-view chat-id group-chat chat-name
{:container styles/photo-container
:size 40
:chat-icon chat-icon.styles/chat-icon-chat-list
:default-chat-icon (chat-icon.styles/default-chat-icon-chat-list color)
:default-chat-icon-text (chat-icon.styles/default-chat-icon-text 40)
:accessibility-label :current-account-photo}]
:accessibility-label :current-account-photo}])
[quo/text {:weight :medium
:color (when muted :secondary)
:accessibility-label :chat-name-or-sender-text