Refactor stateActions for better overview.

This commit is contained in:
Håvar Aambø Fosstveit
2019-11-05 11:53:21 +01:00
parent a9be34aea7
commit 8ab1475fea
31 changed files with 667 additions and 873 deletions
+76
View File
@@ -0,0 +1,76 @@
export const setMe = ({ peerId, device, loginEnabled }) =>
({
type : 'SET_ME',
payload : { peerId, device, loginEnabled }
});
export const loggedIn = (flag) =>
({
type : 'LOGGED_IN',
payload : { flag }
});
export const setPicture = (picture) =>
({
type : 'SET_PICTURE',
payload : { picture }
});
export const setMediaCapabilities = ({
canSendMic,
canSendWebcam,
canShareScreen,
canShareFiles
}) =>
({
type : 'SET_MEDIA_CAPABILITIES',
payload : { canSendMic, canSendWebcam, canShareScreen, canShareFiles }
});
export const setAudioDevices = (devices) =>
({
type : 'SET_AUDIO_DEVICES',
payload : { devices }
});
export const setWebcamDevices = (devices) =>
({
type : 'SET_WEBCAM_DEVICES',
payload : { devices }
});
export const setMyRaiseHandState = (flag) =>
({
type : 'SET_MY_RAISE_HAND_STATE',
payload : { flag }
});
export const setAudioInProgress = (flag) =>
({
type : 'SET_AUDIO_IN_PROGRESS',
payload : { flag }
});
export const setWebcamInProgress = (flag) =>
({
type : 'SET_WEBCAM_IN_PROGRESS',
payload : { flag }
});
export const setScreenShareInProgress = (flag) =>
({
type : 'SET_SCREEN_SHARE_IN_PROGRESS',
payload : { flag }
});
export const setMyRaiseHandStateInProgress = (flag) =>
({
type : 'SET_MY_RAISE_HAND_STATE_IN_PROGRESS',
payload : { flag }
});
export const setDisplayNameInProgress = (flag) =>
({
type : 'SET_DISPLAY_NAME_IN_PROGRESS',
payload : { flag }
});