fix chat toolbar

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-10-25 11:06:43 +02:00
parent 3a7fecf5ce
commit c4aac1478e
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
2 changed files with 7 additions and 7 deletions

View File

@ -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))

View File

@ -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]))