|
@@ -1,7 +1,7 @@
|
1
|
1
|
// @flow
|
2
|
2
|
import type { Dispatch } from 'redux';
|
3
|
3
|
|
4
|
|
-import { getLocalParticipant, getRemoteParticipants, pinParticipant } from '../base/participants';
|
|
4
|
+import { getLocalParticipant, getParticipantById, pinParticipant } from '../base/participants';
|
5
|
5
|
|
6
|
6
|
import {
|
7
|
7
|
SET_HORIZONTAL_VIEW_DIMENSIONS,
|
|
@@ -130,9 +130,12 @@ export function setHorizontalViewDimensions() {
|
130
|
130
|
export function clickOnVideo(n: number) {
|
131
|
131
|
return (dispatch: Function, getState: Function) => {
|
132
|
132
|
const state = getState();
|
133
|
|
- const participants = [ getLocalParticipant(state), ...getRemoteParticipants(state).values() ];
|
134
|
|
- const nThParticipant = participants[n];
|
135
|
|
- const { id, pinned } = nThParticipant;
|
|
133
|
+ const { id: localId } = getLocalParticipant(state);
|
|
134
|
+
|
|
135
|
+ // Use the reordered list of participants.
|
|
136
|
+ const { remoteParticipants } = state['features/filmstrip'];
|
|
137
|
+ const participants = [ localId, ...remoteParticipants ];
|
|
138
|
+ const { id, pinned } = getParticipantById(state, participants[n]);
|
136
|
139
|
|
137
|
140
|
dispatch(pinParticipant(pinned ? null : id));
|
138
|
141
|
};
|