Profile pic on communities and contacts screen (#16042)

This commit is contained in:
Alexander 2023-05-31 11:35:35 +01:00 committed by GitHub
parent 9dad4716d6
commit 98067f8c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -8,6 +8,7 @@
[quo2.foundations.colors :as colors]
[react-native.blur :as blur]
[react-native.platform :as platform]
[status-im.multiaccounts.core :as multiaccounts]
[status-im2.contexts.chat.home.style :as style]
[status-im2.common.contact-list.view :as contact-list]
[status-im2.common.home.view :as common.home]
@ -106,6 +107,7 @@
(let [pending-contact-requests (rf/sub [:activity-center/pending-contact-requests])
selected-tab (or (rf/sub [:messages-home/selected-tab]) :tab/recent)
{:keys [key-uid]} (rf/sub [:multiaccount])
account (rf/sub [:profile/multiaccount])
profile-color (:color (rf/sub [:onboarding-2/profile]))
customization-color (if profile-color
profile-color
@ -123,7 +125,9 @@
:style style/blur}]
[common.home/top-nav
{:type :grey
:avatar {:customization-color customization-color}}]
:avatar {:customization-color customization-color
:full-name (multiaccounts/displayed-name account)
:profile-picture (multiaccounts/displayed-photo account)}}]
[common.home/title-column
{:label (i18n/label :t/messages)
:handler #(rf/dispatch [:show-bottom-sheet {:content home.sheet/new-chat}])

View File

@ -7,6 +7,7 @@
[react-native.safe-area :as safe-area]
[react-native.blur :as blur]
[react-native.platform :as platform]
[status-im.multiaccounts.core :as multiaccounts]
[status-im2.common.home.view :as common.home]
[status-im2.contexts.communities.actions.community-options.view :as options]
[status-im2.contexts.communities.home.style :as style]
@ -54,6 +55,7 @@
(let [selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
{:keys [key-uid]} (rf/sub [:multiaccount])
account (rf/sub [:profile/multiaccount])
profile-color (:color (rf/sub [:onboarding-2/profile]))
customization-color (if profile-color
profile-color
@ -80,7 +82,9 @@
:style style/blur}]
[common.home/top-nav
{:type :grey
:avatar {:customization-color customization-color}}]
:avatar {:customization-color customization-color
:full-name (multiaccounts/displayed-name account)
:profile-picture (multiaccounts/displayed-photo account)}}]
[common.home/title-column
{:label (i18n/label :t/communities)
:handler #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])