Fix for group chat invites icon in activity center

This commit is contained in:
Brian Sztamfater 2021-07-26 15:54:25 -03:00 committed by Andrea Maria Piana
parent bbaf55fddd
commit 5c29ea38ea
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 11 additions and 10 deletions

View File

@ -6,13 +6,13 @@
[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]
[status-im.ui.components.colors :as colors]
[status-im.ui.screens.home.views.inner-item :as home-item]))
[status-im.ui.screens.home.views.inner-item :as home-item]
[status-im.ui.components.chat-icon.screen :as chat-icon.screen]
[status-im.ui.components.chat-icon.styles :as chat-icon.styles]))
(defn mention-element [from]
(let [contact-name @(re-frame/subscribe [:contacts/contact-name-by-identity from])]
@ -113,19 +113,20 @@
(render-message (:parsed-text content) max-notification-length max-number-of-lines style text-weight))])
(defn activity-text-item [home-item opts]
(let [{:keys [chat-id chat-name message last-message reply-message muted read group-chat timestamp type]} home-item
(let [{:keys [chat-id chat-name message last-message reply-message muted read group-chat timestamp type color]} home-item
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}
[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}]
[quo/text {:weight :medium
:color (when muted :secondary)
:accessibility-label :chat-name-or-sender-text