fix(notifications): show notifications after reducers update to get name

Otherwise the participant will not have been added yet
to state so the participant name will not display in
the notification.
This commit is contained in:
Leonard Kim 2019-06-24 10:06:15 -07:00 committed by virtuacoplenny
parent 96f013c549
commit 59a9c2d947
1 changed files with 3 additions and 1 deletions

View File

@ -118,13 +118,15 @@ MiddlewareRegistry.register(store => next => action => {
case PARTICIPANT_JOINED: {
_maybePlaySounds(store, action);
const result = _participantJoinedOrUpdated(store, next, action);
const { participant: p } = action;
if (!p.local) {
store.dispatch(showParticipantJoinedNotification(getParticipantDisplayName(store.getState, p.id)));
}
return _participantJoinedOrUpdated(store, next, action);
return result;
}
case PARTICIPANT_LEFT: