mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 18:25:45 +00:00
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]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(defn f-view
|
(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
|
(let [{:keys [group-chat chat-id]} chat
|
||||||
opacity-animation (reanimated/interpolate scroll-y
|
opacity-animation (reanimated/interpolate scroll-y
|
||||||
[style/navigation-bar-height
|
[style/navigation-bar-height
|
||||||
@ -63,7 +64,7 @@
|
|||||||
(when config/shell-navigation-disabled?
|
(when config/shell-navigation-disabled?
|
||||||
(rf/dispatch [:chat/close]))
|
(rf/dispatch [:chat/close]))
|
||||||
(rf/dispatch [:navigate-back]))}
|
(rf/dispatch [:navigate-back]))}
|
||||||
:i/arrow-left]
|
back-icon]
|
||||||
[reanimated/view
|
[reanimated/view
|
||||||
{:style (style/animated-header all-loaded? translate-animation title-opacity-animation)}
|
{:style (style/animated-header all-loaded? translate-animation title-opacity-animation)}
|
||||||
[rn/view {:style style/header-content-container}
|
[rn/view {:style style/header-content-container}
|
||||||
|
@ -39,7 +39,10 @@
|
|||||||
(str (when emoji (str emoji " ")) "# " chat-name)
|
(str (when emoji (str emoji " ")) "# " chat-name)
|
||||||
:else (str emoji chat-name))
|
:else (str emoji chat-name))
|
||||||
online? (rf/sub [:visibility-status-updates/online? chat-id])
|
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
|
(rn/use-effect
|
||||||
(fn []
|
(fn []
|
||||||
;; If keyboard is shown then adjust `scroll-y`
|
;; If keyboard is shown then adjust `scroll-y`
|
||||||
@ -71,6 +74,7 @@
|
|||||||
|
|
||||||
[messages.navigation/navigation-view
|
[messages.navigation/navigation-view
|
||||||
{:scroll-y scroll-y
|
{:scroll-y scroll-y
|
||||||
|
:back-icon back-icon
|
||||||
:chat chat
|
:chat chat
|
||||||
:chat-screen-loaded? chat-screen-loaded?
|
:chat-screen-loaded? chat-screen-loaded?
|
||||||
:all-loaded? all-loaded?
|
:all-loaded? all-loaded?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user