fix: picture update from Lobby
parent
6c07f89ab1
commit
d49ef4e65f
|
|
@ -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 };
|
||||
|
||||
|
|
|
|||
|
|
@ -91,9 +91,6 @@ class Lobby extends EventEmitter
|
|||
|
||||
this._notification(peer.socket, 'enteredLobby');
|
||||
|
||||
if (config.requireSignInToAccess && !peer.authenticated && !super.isLocked())
|
||||
this._notification(peer.socket, 'signInRequired');
|
||||
|
||||
this._peers.set(peer.id, peer);
|
||||
|
||||
peer.on('authenticationChanged', () =>
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ class Room extends EventEmitter
|
|||
{
|
||||
this._parkPeer(peer);
|
||||
|
||||
if (!this._locked)
|
||||
this._notification(peer.socket, 'signInRequired');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue