Details
- Add this code to master (with usingCommServicesAccessToken = true) and check if device lists are populated.
- Make change in user store (e.g. add user) and verify is device list is fetched for this user.
- Make sure this effect does not re-render when not needed.
Diff Detail
- Repository
- rCOMM Comm
- Branch
- peer-list
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/selectors/user-selectors.js | ||
---|---|---|
217 | commbot is the only user without a device list - we want to avoid calling Identity to get that |
lib/handlers/user-infos-handler.react.js | ||
---|---|---|
82–93 | We would typically use dispatchActionPromise here, but I talked to Kamil about this and he doesn't need to have a failed action, nor a loading status for this action. So I think this is fine. We should just make sure this code doesn't result in errors - can getDeviceListsForUsers throw? |
lib/handlers/user-infos-handler.react.js | ||
---|---|---|
82–93 |
Added try catch block
In this case dispatchActionPromise seems like an overkill - a lot more code/types to add and we'll end up polluting redux with dispatched actions that'll never be handled but I can update this as you suggested. However, I'd prefer to do it in a separate diff with other improvements: ENG-8384. |
lib/selectors/user-selectors.js | ||
---|---|---|
217 | Good call-out. For now we don't have a good solution for this. Eventually we'll probably want to add a device list for this user, but not a priority for now |