HomePhabricator
Diffusion Comm 95220f0be98f

[lib][web][native] Navigate to a thread after joining a community

Tags
None
Referenced Files
F1955482: native_link.mov
Jun 6 2024, 9:28 AM
File Not Attached
F1955484: web_link.mov
Jun 6 2024, 9:28 AM
File Not Attached
Subscribers
None

Description

[lib][web][native] Navigate to a thread after joining a community

Summary:
Instead of closing a modal immediately, we schedule a new effect that will navigate to a thread or close a modal, depending on the presence of the thread in the store. We need to run this as an effect in the next render, because we need to wait for the successful join action to be dispatched.

https://linear.app/comm/issue/ENG-8018/navigate-to-a-community-after-accepting-an-invite-link

Depends on D12317

Test Plan: On both web and native: check if the behavior is correct when a user joins a community, is already a member, or a link is invalid.

Reviewers: inka, ginsu

Reviewed By: inka

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D12320

Details