The diff introduces updating activeChatThreadID and pendingThread in navInfo in thread creation mode.
These values from navInfo are not used by chat-message-list-container when creating thread, but can be read from different places of the app - e.g. by ThreadListProvider.
After the change, thread currently being created (or selected from existing by matching users) is correctly displayed in the thread list on the left, and after clicking on the thread on list, the creation mode is closed and pending thread is correctly being displayed.
Details
Selecting some new set of users in thread creation mode to display pending thread. It should be correclty displayed on the top of the thread list.
After clicking on the thread, creation mode should be closed and pending thread should remain open (even after page refresh)
Diff Detail
- Repository
- rCOMM Comm
- Branch
- jacek/thread-creation-2
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
changed the types to () => mixed & wrap using useCallback
Accidentally added description from different diff
web/chat/chat-message-list-container.react.js | ||
---|---|---|
114 ↗ | (On Diff #14265) | We update navInfo hare with data calculated by existingThreadInfoFinder, so to handle navigation update in reducer we'd need to move all the logic responsible for finding thread to reducer. Determining pending thread in reducer basing on activeChatThreadID is possible, and was introduced in the first iteration of D4455, but we decided to move it out of reducer, to keep reducer clear. However, finding proper activeChatThreadIDthere is quite complex (using existingThreadInfoFinder). |