fix: picture update from Lobby
This commit is contained in:
+18
-1
@@ -331,7 +331,7 @@ export default class RoomClient
|
||||
text : 'You are logged in.'
|
||||
}));
|
||||
this.changeDisplayName(displayName);
|
||||
this.changePicture(picture);
|
||||
this.changePicture(picture)
|
||||
}
|
||||
|
||||
_soundNotification()
|
||||
@@ -658,6 +658,8 @@ export default class RoomClient
|
||||
stateActions.addLobbyPeer(peer.peerId));
|
||||
store.dispatch(
|
||||
stateActions.setLobbyPeerDisplayName(peer.displayName));
|
||||
store.dispatch(
|
||||
stateActions.setLobbyPeerPicture(peer.picture));
|
||||
});
|
||||
|
||||
(accessCode != null) && store.dispatch(
|
||||
@@ -1415,6 +1417,21 @@ export default class RoomClient
|
||||
break;
|
||||
}
|
||||
|
||||
case 'lobby:changePicture':
|
||||
{
|
||||
const { peerId, picture } = notification.data;
|
||||
|
||||
store.dispatch(
|
||||
stateActions.setLobbyPeerPicture(picture, peerId));
|
||||
|
||||
store.dispatch(requestActions.notify(
|
||||
{
|
||||
text : `Participant in lobby changed picture.`
|
||||
}));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'setAccessCode':
|
||||
{
|
||||
const { accessCode } = notification.data;
|
||||
|
||||
@@ -461,6 +461,14 @@ export const setLobbyPeerDisplayName = (displayName, peerId) =>
|
||||
};
|
||||
};
|
||||
|
||||
export const setLobbyPeerPicture = (picture, peerId) =>
|
||||
{
|
||||
return {
|
||||
type : 'SET_LOBBY_PEER_PICTURE',
|
||||
payload : { picture, peerId }
|
||||
};
|
||||
};
|
||||
|
||||
export const setLobbyPeerPromotionInProgress = (peerId, flag) =>
|
||||
{
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,10 @@ const lobbyPeer = (state = {}, action) =>
|
||||
|
||||
case 'SET_LOBBY_PEER_DISPLAY_NAME':
|
||||
return { ...state, displayName: action.payload.displayName };
|
||||
|
||||
|
||||
case 'SET_LOBBY_PEER_PICTURE':
|
||||
return { ...state, picture: action.payload.picture };
|
||||
|
||||
case 'SET_LOBBY_PEER_PROMOTION_IN_PROGRESS':
|
||||
return { ...state, promotionInProgress: action.payload.flag };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user