Reduce direct read access to the features/base/participants redux state

As part of the work on fixing the problem with the multiplying
thumbnails, we've associated remote participant w/ JitsiConference.
However, there are periods of time when multiple JitsiConferences are in
the redux state (and that period is going to be shorted by
StateListenerRegistry). In order to give more control to the feature
base/participants, reduce the occurrences of direct access to the
features/base/participants redux state and utilize the feature's
existing read access functions. Which will allow us in the future to
enhance these functions to access participants which are relevant to the
current conference of interest to the user only.
This commit is contained in:
Lyubo Marinov
2018-05-22 17:41:53 -05:00
parent 771d60f954
commit 8cd2bd272b
9 changed files with 28 additions and 39 deletions

View File

@@ -159,10 +159,7 @@ class RemoteControlAuthorizationDialog extends Component<*> {
*/
function _mapStateToProps(state, ownProps) {
const { _displayName, participantId } = ownProps;
const participant
= getParticipantById(
state['features/base/participants'],
participantId);
const participant = getParticipantById(state, participantId);
return {
_displayName: participant ? participant.name : _displayName