HomePhabricator
Diffusion Comm 901d0bf8d6ba

[native] base on existing thread info when there is any and user is not…

Description

[native] base on existing thread info when there is any and user is not searching

Summary:
Solution for bug with missing thread content after adding user to thread.

Problem
Logic works fine when the user is searching, but after sending a message and closing the search bar we still rely on pending thread.
After adding new user from modal we still have a pending thread in ConnectedMessageListContainers state, and useExistingThreadInfoFinders logic will return the same since it's pending and what is more, the thread doesn't exist anymore, because now our thread has more users and changed (that is why content is missing).

Solution
Always when there is an existing thread and user is not searching we should update a state to not rely on pending thread anymore.
I think there aren't any contraindications to do it and it helps with the issue.

Test Plan:

  1. Create new message -> add 2 users -> send message -> click on conversation title and add one more user from modal -> click Back and content should be present. (check if issue was solved)
  2. A lot of other testing scenarios connected with searching for users (friend/non-friend), adding new user, creating threads, searching and at the same time creating threads with the same users on different account etc. to make sure this change don't modify any current logic.

Reviewers: tomek, atul, abosh, ashoat

Reviewed By: ashoat

Subscribers: ashoat, atul, abosh

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