mirror of
https://github.com/status-im/status-react.git
synced 2025-02-17 21:38:07 +00:00
fix(chats): Navigation after opening a profile link
This commit is contained in:
parent
babcd96fb6
commit
30fe558302
@ -212,6 +212,11 @@
|
|||||||
#(when (group-chat? cofx chat-id)
|
#(when (group-chat? cofx chat-id)
|
||||||
(loading/load-chat % chat-id))))
|
(loading/load-chat % chat-id))))
|
||||||
|
|
||||||
|
(rf/reg-event-fx
|
||||||
|
:chat/clear-current-chat-id
|
||||||
|
(fn [{:keys [db]}]
|
||||||
|
{:db (dissoc db :current-chat-id)}))
|
||||||
|
|
||||||
(rf/defn pop-to-root-and-navigate-to-chat
|
(rf/defn pop-to-root-and-navigate-to-chat
|
||||||
{:events [:chat/pop-to-root-and-navigate-to-chat]}
|
{:events [:chat/pop-to-root-and-navigate-to-chat]}
|
||||||
[cofx chat-id animation]
|
[cofx chat-id animation]
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
chat-screen-layout-calculations-complete?}]
|
chat-screen-layout-calculations-complete?}]
|
||||||
(when *screen-loaded?*
|
(when *screen-loaded?*
|
||||||
(rn/use-mount #(reset! *screen-loaded?* true)))
|
(rn/use-mount #(reset! *screen-loaded?* true)))
|
||||||
|
(rn/use-unmount #(rf/dispatch [:chat/clear-current-chat-id]))
|
||||||
(when-not (if *screen-loaded?* @*screen-loaded?* screen-loaded?)
|
(when-not (if *screen-loaded?* @*screen-loaded?* screen-loaded?)
|
||||||
(reanimated/set-shared-value chat-screen-layout-calculations-complete? false)
|
(reanimated/set-shared-value chat-screen-layout-calculations-complete? false)
|
||||||
(reanimated/set-shared-value distance-from-list-top 0)
|
(reanimated/set-shared-value distance-from-list-top 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user