From c4aac1478e22ca68d7d35c37414e2502753e0ddb Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 25 Oct 2021 11:06:43 +0200 Subject: [PATCH] fix chat toolbar Signed-off-by: andrey --- src/status_im/ui/screens/chat/toolbar_content.cljs | 6 ++---- src/status_im/ui/screens/chat/views.cljs | 8 +++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/status_im/ui/screens/chat/toolbar_content.cljs b/src/status_im/ui/screens/chat/toolbar_content.cljs index 1db4603a0d..8f8ef22d39 100644 --- a/src/status_im/ui/screens/chat/toolbar_content.cljs +++ b/src/status_im/ui/screens/chat/toolbar_content.cljs @@ -36,16 +36,14 @@ chat-info] [react/view {:style st/toolbar-container} [react/view {:margin-right 10} - [react/touchable-highlight {:on-press #(when-not group-chat (re-frame/dispatch [:chat.ui/show-profile chat-id]))} - [chat-icon.screen/chat-icon-view-toolbar chat-id group-chat chat-name color emoji]]] + [chat-icon.screen/chat-icon-view-toolbar chat-id group-chat chat-name color emoji]] [react/view {:style st/chat-name-view} (if group-chat [react/text {:style st/chat-name-text :number-of-lines 1 :accessibility-label :chat-name-text} chat-name] - [react/touchable-highlight {:on-press #(re-frame/dispatch [:chat.ui/show-profile chat-id])} - [one-to-one-name chat-id]]) + [one-to-one-name chat-id]) (when-not group-chat [contact-indicator chat-id]) (when (and group-chat (not invitation-admin) (not= chat-type constants/community-chat-type)) diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index c3892cf408..2bc8a2c87f 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -336,9 +336,11 @@ :height 256}])) (defn topbar [] - (let [window-width @(re-frame/subscribe [:dimensions/window-width])] - [react/view {:flex 1 :width (- window-width 120)} - [toolbar-content/toolbar-content-view-inner @(re-frame/subscribe [:chats/current-chat])]])) + (let [window-width @(re-frame/subscribe [:dimensions/window-width]) + {:keys [group-chat chat-id] :as chat-info} @(re-frame/subscribe [:chats/current-chat])] + [react/touchable-highlight {:on-press #(when-not group-chat (re-frame/dispatch [:chat.ui/show-profile chat-id])) + :style {:flex 1 :width (- window-width 120)}} + [toolbar-content/toolbar-content-view-inner chat-info]])) (defn chat [] (let [curr-chat-id (:chat-id @(re-frame/subscribe [:chats/current-chat-chat-view]))