fix: back button on 1:1 chat (#17544)
* fix: back button on 1:1 chat * fix: show close icon only for 1:1 and community chat * fix: use close icon for only 1:1 chat
This commit is contained in:
parent
afbd890a04
commit
b88dcf1072
|
@ -15,7 +15,8 @@
|
|||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn f-view
|
||||
[{:keys [theme scroll-y chat chat-screen-loaded? all-loaded? display-name online? photo-path]}]
|
||||
[{:keys [theme scroll-y chat chat-screen-loaded? all-loaded? display-name online? photo-path
|
||||
back-icon]}]
|
||||
(let [{:keys [group-chat chat-id]} chat
|
||||
opacity-animation (reanimated/interpolate scroll-y
|
||||
[style/navigation-bar-height
|
||||
|
@ -63,7 +64,7 @@
|
|||
(when config/shell-navigation-disabled?
|
||||
(rf/dispatch [:chat/close]))
|
||||
(rf/dispatch [:navigate-back]))}
|
||||
:i/arrow-left]
|
||||
back-icon]
|
||||
[reanimated/view
|
||||
{:style (style/animated-header all-loaded? translate-animation title-opacity-animation)}
|
||||
[rn/view {:style style/header-content-container}
|
||||
|
|
|
@ -39,7 +39,10 @@
|
|||
(str (when emoji (str emoji " ")) "# " chat-name)
|
||||
:else (str emoji chat-name))
|
||||
online? (rf/sub [:visibility-status-updates/online? chat-id])
|
||||
photo-path (rf/sub [:chats/photo-path chat-id])]
|
||||
photo-path (rf/sub [:chats/photo-path chat-id])
|
||||
back-icon (if (= chat-type constants/one-to-one-chat-type)
|
||||
:i/close
|
||||
:i/arrow-left)]
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
;; If keyboard is shown then adjust `scroll-y`
|
||||
|
@ -71,6 +74,7 @@
|
|||
|
||||
[messages.navigation/navigation-view
|
||||
{:scroll-y scroll-y
|
||||
:back-icon back-icon
|
||||
:chat chat
|
||||
:chat-screen-loaded? chat-screen-loaded?
|
||||
:all-loaded? all-loaded?
|
||||
|
|
Loading…
Reference in New Issue