Bläddra i källkod

Merge pull request #3630 from virtuacoplenny/lenny/youtube-1-on-1

fix(filmstrip): show thumbnails in 1-on-1 with a fake participant
master
virtuacoplenny 6 år sedan
förälder
incheckning
957606b3f8
Inget konto är kopplat till bidragsgivarens mejladress

+ 14
- 0
react/features/base/participants/functions.js Visa fil

125
     return getParticipants(stateful).length;
125
     return getParticipants(stateful).length;
126
 }
126
 }
127
 
127
 
128
+/**
129
+ * Returns a count of the known participants in the passed in redux state,
130
+ * including fake participants.
131
+ *
132
+ * @param {(Function|Object|Participant[])} stateful - The redux state
133
+ * features/base/participants, the (whole) redux state, or redux's
134
+ * {@code getState} function to be used to retrieve the state
135
+ * features/base/participants.
136
+ * @returns {number}
137
+ */
138
+export function getParticipantCountWithFake(stateful: Object | Function) {
139
+    return _getAllParticipants(stateful).length;
140
+}
141
+
128
 /**
142
 /**
129
  * Returns participant's display name.
143
  * Returns participant's display name.
130
  *
144
  *

+ 5
- 2
react/features/filmstrip/functions.web.js Visa fil

1
 // @flow
1
 // @flow
2
 
2
 
3
 import {
3
 import {
4
-    getParticipantCount,
4
+    getParticipantCountWithFake,
5
     getPinnedParticipant
5
     getPinnedParticipant
6
 } from '../base/participants';
6
 } from '../base/participants';
7
 import { toState } from '../base/redux';
7
 import { toState } from '../base/redux';
36
         return false;
36
         return false;
37
     }
37
     }
38
 
38
 
39
-    const participantCount = getParticipantCount(state);
39
+    // Include fake participants to derive how many thumbnails are dispalyed,
40
+    // as it is assumed all participants, including fake, will be displayed
41
+    // in the filmstrip.
42
+    const participantCount = getParticipantCountWithFake(state);
40
     let pinnedParticipant;
43
     let pinnedParticipant;
41
 
44
 
42
     return Boolean(
45
     return Boolean(

Laddar…
Avbryt
Spara