Procházet zdrojové kódy

fix(KeyboardShortcut): pin the correct participants when number keys are used.

master
Jaya Allamsetty před 3 roky
rodič
revize
751d9a9b8e
1 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. 7
    4
      react/features/filmstrip/actions.web.js

+ 7
- 4
react/features/filmstrip/actions.web.js Zobrazit soubor

@@ -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
     };

Načítá se…
Zrušit
Uložit