浏览代码

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

master
Jaya Allamsetty 3 年前
父节点
当前提交
751d9a9b8e
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7
    4
      react/features/filmstrip/actions.web.js

+ 7
- 4
react/features/filmstrip/actions.web.js 查看文件

1
 // @flow
1
 // @flow
2
 import type { Dispatch } from 'redux';
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
 import {
6
 import {
7
     SET_HORIZONTAL_VIEW_DIMENSIONS,
7
     SET_HORIZONTAL_VIEW_DIMENSIONS,
130
 export function clickOnVideo(n: number) {
130
 export function clickOnVideo(n: number) {
131
     return (dispatch: Function, getState: Function) => {
131
     return (dispatch: Function, getState: Function) => {
132
         const state = getState();
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
         dispatch(pinParticipant(pinned ? null : id));
140
         dispatch(pinParticipant(pinned ? null : id));
138
     };
141
     };

正在加载...
取消
保存