Profile pic on communities and contacts screen (#16042)
This commit is contained in:
parent
9dad4716d6
commit
98067f8c8e
|
@ -8,6 +8,7 @@
|
||||||
[quo2.foundations.colors :as colors]
|
[quo2.foundations.colors :as colors]
|
||||||
[react-native.blur :as blur]
|
[react-native.blur :as blur]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
|
[status-im.multiaccounts.core :as multiaccounts]
|
||||||
[status-im2.contexts.chat.home.style :as style]
|
[status-im2.contexts.chat.home.style :as style]
|
||||||
[status-im2.common.contact-list.view :as contact-list]
|
[status-im2.common.contact-list.view :as contact-list]
|
||||||
[status-im2.common.home.view :as common.home]
|
[status-im2.common.home.view :as common.home]
|
||||||
|
@ -106,6 +107,7 @@
|
||||||
(let [pending-contact-requests (rf/sub [:activity-center/pending-contact-requests])
|
(let [pending-contact-requests (rf/sub [:activity-center/pending-contact-requests])
|
||||||
selected-tab (or (rf/sub [:messages-home/selected-tab]) :tab/recent)
|
selected-tab (or (rf/sub [:messages-home/selected-tab]) :tab/recent)
|
||||||
{:keys [key-uid]} (rf/sub [:multiaccount])
|
{:keys [key-uid]} (rf/sub [:multiaccount])
|
||||||
|
account (rf/sub [:profile/multiaccount])
|
||||||
profile-color (:color (rf/sub [:onboarding-2/profile]))
|
profile-color (:color (rf/sub [:onboarding-2/profile]))
|
||||||
customization-color (if profile-color
|
customization-color (if profile-color
|
||||||
profile-color
|
profile-color
|
||||||
|
@ -123,7 +125,9 @@
|
||||||
:style style/blur}]
|
:style style/blur}]
|
||||||
[common.home/top-nav
|
[common.home/top-nav
|
||||||
{:type :grey
|
{: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
|
[common.home/title-column
|
||||||
{:label (i18n/label :t/messages)
|
{:label (i18n/label :t/messages)
|
||||||
:handler #(rf/dispatch [:show-bottom-sheet {:content home.sheet/new-chat}])
|
:handler #(rf/dispatch [:show-bottom-sheet {:content home.sheet/new-chat}])
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
[react-native.safe-area :as safe-area]
|
[react-native.safe-area :as safe-area]
|
||||||
[react-native.blur :as blur]
|
[react-native.blur :as blur]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
|
[status-im.multiaccounts.core :as multiaccounts]
|
||||||
[status-im2.common.home.view :as common.home]
|
[status-im2.common.home.view :as common.home]
|
||||||
[status-im2.contexts.communities.actions.community-options.view :as options]
|
[status-im2.contexts.communities.actions.community-options.view :as options]
|
||||||
[status-im2.contexts.communities.home.style :as style]
|
[status-im2.contexts.communities.home.style :as style]
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
(let [selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
|
(let [selected-tab (or (rf/sub [:communities/selected-tab]) :joined)
|
||||||
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
|
{:keys [joined pending opened]} (rf/sub [:communities/grouped-by-status])
|
||||||
{:keys [key-uid]} (rf/sub [:multiaccount])
|
{:keys [key-uid]} (rf/sub [:multiaccount])
|
||||||
|
account (rf/sub [:profile/multiaccount])
|
||||||
profile-color (:color (rf/sub [:onboarding-2/profile]))
|
profile-color (:color (rf/sub [:onboarding-2/profile]))
|
||||||
customization-color (if profile-color
|
customization-color (if profile-color
|
||||||
profile-color
|
profile-color
|
||||||
|
@ -80,7 +82,9 @@
|
||||||
:style style/blur}]
|
:style style/blur}]
|
||||||
[common.home/top-nav
|
[common.home/top-nav
|
||||||
{:type :grey
|
{: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
|
[common.home/title-column
|
||||||
{:label (i18n/label :t/communities)
|
{:label (i18n/label :t/communities)
|
||||||
:handler #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])
|
:handler #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])
|
||||||
|
|
Loading…
Reference in New Issue