From b791fc32fd72aae53cdc1551902421b9abf5cb5e Mon Sep 17 00:00:00 2001 From: Bettenbuk Zoltan Date: Mon, 1 Apr 2019 17:42:16 +0200 Subject: [PATCH] [RN] Make BaseIndicator render simpler --- .../components/native/BaseIndicator.js | 19 +++++----------- .../filmstrip/components/native/styles.js | 22 ++++++++----------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/react/features/filmstrip/components/native/BaseIndicator.js b/react/features/filmstrip/components/native/BaseIndicator.js index 8d16a24c6..d52a461bf 100644 --- a/react/features/filmstrip/components/native/BaseIndicator.js +++ b/react/features/filmstrip/components/native/BaseIndicator.js @@ -33,19 +33,12 @@ export default class BaseIndicator extends Component { render() { const { highlight, icon } = this.props; - const iconElement = ( + return ( + + + ); - - if (highlight) { - return ( - - { iconElement } - - ); - } - - return iconElement; } } diff --git a/react/features/filmstrip/components/native/styles.js b/react/features/filmstrip/components/native/styles.js index 3f5c6b7b7..3894739b6 100644 --- a/react/features/filmstrip/components/native/styles.js +++ b/react/features/filmstrip/components/native/styles.js @@ -14,6 +14,15 @@ export const AVATAR_SIZE = 50; * The styles of the feature filmstrip. */ export default { + /** + * Highlighted indicator additional style. + */ + highlightedIndicator: { + backgroundColor: ColorPalette.blue, + borderRadius: 16, + padding: 4 + }, + /** * Dominant speaker indicator style. */ @@ -28,19 +37,6 @@ export default { } }, - /** - * Dominant speaker indicator background style. - */ - indicatorBackground: { - alignItems: 'center', - backgroundColor: ColorPalette.blue, - borderRadius: 16, - flexDirection: 'row', - justifyContent: 'center', - height: 20, - width: 20 - }, - /** * The style of the narrow {@link Filmstrip} version which displays * thumbnails in a row at the bottom of the screen.