fix(chats): Navigation after opening a profile link

This commit is contained in:
Ulises M 2024-08-28 18:44:07 -06:00
parent babcd96fb6
commit 30fe558302
No known key found for this signature in database
GPG Key ID: 5A15782EB758534E
2 changed files with 6 additions and 0 deletions

View File

@ -212,6 +212,11 @@
#(when (group-chat? cofx 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
{:events [:chat/pop-to-root-and-navigate-to-chat]}
[cofx chat-id animation]

View File

@ -57,6 +57,7 @@
chat-screen-layout-calculations-complete?}]
(when *screen-loaded?*
(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?)
(reanimated/set-shared-value chat-screen-layout-calculations-complete? false)
(reanimated/set-shared-value distance-from-list-top 0)