From b6a6c99c9dd357955dfe4821b5eb0b251d58565c Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Mon, 31 Oct 2016 12:33:32 -0500 Subject: [PATCH] [React Native] Enable scrolling of the thumbnails --- .../filmStrip/components/FilmStrip.js | 37 +++++++++++++++---- react/features/filmStrip/components/styles.js | 17 +++++++-- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/react/features/filmStrip/components/FilmStrip.js b/react/features/filmStrip/components/FilmStrip.js index 8fa04a59ba..a492f99e9c 100644 --- a/react/features/filmStrip/components/FilmStrip.js +++ b/react/features/filmStrip/components/FilmStrip.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; +import { ScrollView } from 'react-native'; import { Container } from '../../base/react'; @@ -22,14 +23,34 @@ class FilmStrip extends Component { - { - this.props.participants - .sort((a, b) => b.local - a.local) - .map(p => - ) - } + + { + this.props.participants + + // Group the remote participants so that the local + // participant does not appear in between remote + // participants. + .sort((a, b) => b.local - a.local) + + // Have the local participant at the rightmost side. + // Then have the remote participants from right to + // left with the newest added/joined to the leftmost + // side. + .reverse() + .map(p => + ) + } + ); } diff --git a/react/features/filmStrip/components/styles.js b/react/features/filmStrip/components/styles.js index 83223c33e4..6e28d9c366 100644 --- a/react/features/filmStrip/components/styles.js +++ b/react/features/filmStrip/components/styles.js @@ -36,15 +36,26 @@ export const styles = { }, /** - * Participants container style. + * The style of the Container which represents the very film strip. */ filmStrip: { + alignItems: 'flex-end', alignSelf: 'stretch', bottom: 10, flex: 1, - flexDirection: 'row', + flexDirection: 'column', + left: 0, position: 'absolute', - right: 5 + right: 0 + }, + + /** + * The style of the content container of the ScrollView which is placed + * inside filmStrip and which contains the participants' thumbnails in order + * to allow scrolling through them if they do not fit within the display. + */ + filmStripScrollViewContentContainer: { + paddingHorizontal: 10 }, /**