[web] Change ThreadList behaviour after hiding ChatThreadComposer
Summary:
Depends on D4939
Context: here
Changing behaviour after closing ChatThreadComposer.
Now, when we close thread composer on pending thread by clicking the X button, app will focus on the first thread on the top of the list
In other cases, app will focus on the currently generated or matched thread.
Also, this diff improves behavior of ChatThreadListItem onClick event. Now, clicking on currently active thread in chat creation mode doesn't close ChatThreadComposer.
Test Plan:
Steps to test new ChatThreadComposer behavior:
- Click Create new chat
- Create pending thread (don't select any users or select set of users, which doesn't match to any existing thread)
- Close composer by click X button
Now, app is currently focused on the first thread from the thread list.
In other cases, when we send a message to a new thread or we close ChatThreadComposer on an already existing thread, app keeps focus on the current thread.
Steps to test new ChatThreadListItem behavior:
- Click Create new chat: a) Click on currently active ChatThreadListItem -> chat creation mode still active b) Click on any other ChatThreadListItem -> app switches active chat item to the new one and closes chat creation mode
Reviewers: tomek, atul, ashoat
Reviewed By: tomek, ashoat
Subscribers: ashoat, tomek, atul, abosh
Differential Revision: https://phab.comm.dev/D4940