From 2899819e956ec2114cbf2c97f580718d7046892d Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Thu, 19 Jan 2023 12:02:05 +0100 Subject: [PATCH] rollback user profile (#14828) --- .../ui/screens/profile/contact/views.cljs | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/profile/contact/views.cljs b/src/status_im/ui/screens/profile/contact/views.cljs index f3cf0544e0..b20b333dd6 100644 --- a/src/status_im/ui/screens/profile/contact/views.cljs +++ b/src/status_im/ui/screens/profile/contact/views.cljs @@ -11,6 +11,7 @@ [status-im.ui.components.chat-icon.screen :as chat-icon] [status-im.ui.components.icons.icons :as icons] [status-im.ui.components.keyboard-avoid-presentation :as kb-presentation] + [status-im.ui.components.profile-header.view :as profile-header] [status-im.ui.components.react :as react] [status-im.ui.components.toolbar :as toolbar] [status-im.ui.components.topbar :as topbar] @@ -207,6 +208,11 @@ [] (let [{:keys [public-key name ens-verified] :as contact} @(re-frame/subscribe [:contacts/current-contact]) + muted? @(re-frame/subscribe [:chats/muted + public-key]) + pinned-messages @(re-frame/subscribe [:chats/pinned + public-key]) + [first-name second-name] (multiaccounts/contact-two-names contact true) on-share #(re-frame/dispatch [:show-popover (merge @@ -222,4 +228,27 @@ :on-press on-share}] :left-accessories [{:icon :main-icons/close :accessibility-label :back-button - :on-press #(re-frame/dispatch [:navigate-back])}]}]]))) + :on-press #(re-frame/dispatch [:navigate-back])}]}] + [:<> + [(profile-header/extended-header + {:on-press on-share + :bottom-separator false + :title first-name + :photo (multiaccounts/displayed-photo contact) + :monospace (not ens-verified) + :subtitle second-name + :public-key public-key})] + [react/view + {:height 1 :background-color colors/gray-lighter :margin-top 8}] + [nickname-settings contact] + [pin-settings public-key (count pinned-messages)] + [react/view {:height 1 :background-color colors/gray-lighter}] + [react/view + {:padding-top 17 + :flex-direction :row + :align-items :stretch + :flex 1} + (for [{:keys [label] :as action} (actions contact muted?) + :when label] + ^{:key label} + [button-item action])]]])))