Store selected user for filmstrip in store

This commit is contained in:
Torjus
2018-08-02 12:18:07 +02:00
parent 48ac6c8391
commit 9b407d58a0
3 changed files with 34 additions and 20 deletions
+5 -1
View File
@@ -7,7 +7,8 @@ const initialState =
advancedMode : false,
fullScreenConsumer : null, // ConsumerID
toolbarsVisible : true,
mode : 'democratic'
mode : 'democratic',
selectedPeerName : null
};
const room = (state = initialState, action) =>
@@ -70,6 +71,9 @@ const room = (state = initialState, action) =>
case 'SET_DISPLAY_MODE':
return { ...state, mode: action.payload.mode };
case 'SET_SELECTED_PEER':
return { ...state, selectedPeerName: action.payload.selectedPeerName };
default:
return state;
}
+6 -1
View File
@@ -472,4 +472,9 @@ export const setPeerPicture = (peerName, picture) =>
export const loggedIn = () =>
({
type : 'LOGGED_IN'
});
});
export const setSelectedPeer = (selectedPeerName) => ({
type : 'SET_SELECTED_PEER',
payload : { selectedPeerName }
});