|
@@ -1,5 +1,6 @@
|
1
|
1
|
import React, { Component } from 'react';
|
2
|
2
|
import { connect } from 'react-redux';
|
|
3
|
+import { ScrollView } from 'react-native';
|
3
|
4
|
|
4
|
5
|
import { Container } from '../../base/react';
|
5
|
6
|
|
|
@@ -22,14 +23,34 @@ class FilmStrip extends Component {
|
22
|
23
|
<Container
|
23
|
24
|
style = { styles.filmStrip }
|
24
|
25
|
visible = { this.props.visible }>
|
25
|
|
- {
|
26
|
|
- this.props.participants
|
27
|
|
- .sort((a, b) => b.local - a.local)
|
28
|
|
- .map(p =>
|
29
|
|
- <Thumbnail
|
30
|
|
- key = { p.id }
|
31
|
|
- participant = { p } />)
|
32
|
|
- }
|
|
26
|
+ <ScrollView
|
|
27
|
+
|
|
28
|
+ // eslint-disable-next-line react/jsx-curly-spacing
|
|
29
|
+ contentContainerStyle = {
|
|
30
|
+ styles.filmStripScrollViewContentContainer
|
|
31
|
+ } // eslint-disable-line react/jsx-curly-spacing
|
|
32
|
+ horizontal = { true }
|
|
33
|
+ showsHorizontalScrollIndicator = { false }
|
|
34
|
+ showsVerticalScrollIndicator = { false }>
|
|
35
|
+ {
|
|
36
|
+ this.props.participants
|
|
37
|
+
|
|
38
|
+ // Group the remote participants so that the local
|
|
39
|
+ // participant does not appear in between remote
|
|
40
|
+ // participants.
|
|
41
|
+ .sort((a, b) => b.local - a.local)
|
|
42
|
+
|
|
43
|
+ // Have the local participant at the rightmost side.
|
|
44
|
+ // Then have the remote participants from right to
|
|
45
|
+ // left with the newest added/joined to the leftmost
|
|
46
|
+ // side.
|
|
47
|
+ .reverse()
|
|
48
|
+ .map(p =>
|
|
49
|
+ <Thumbnail
|
|
50
|
+ key = { p.id }
|
|
51
|
+ participant = { p } />)
|
|
52
|
+ }
|
|
53
|
+ </ScrollView>
|
33
|
54
|
</Container>
|
34
|
55
|
);
|
35
|
56
|
}
|