From 657651609103d82e9a7d7f63a8dadaffa4a7163d Mon Sep 17 00:00:00 2001 From: Stefan Otto Date: Tue, 19 May 2020 02:45:06 +0200 Subject: [PATCH] lint + noiseVolume changes --- app/src/components/Containers/Me.js | 6 +++--- app/src/components/Settings/MediaSettings.js | 18 +++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/src/components/Containers/Me.js b/app/src/components/Containers/Me.js index ed98d2d..58f801b 100644 --- a/app/src/components/Containers/Me.js +++ b/app/src/components/Containers/Me.js @@ -901,9 +901,9 @@ const makeMapStateToProps = () => if (state.peerVolumes[state.me.id] < state.settings.noiseThreshold) { // noiseVolume mapped to range 0.5 ... 1 (threshold switch) - volume = 1 + (Math.abs(state.peerVolumes[state.me.id] - - state.settings.noiseThreshold) / - state.settings.noiseThreshold) / 2; + volume = 1 + ((Math.abs(state.peerVolumes[state.me.id] - + state.settings.noiseThreshold) / (-120 - + state.settings.noiseThreshold))); } // noiseVolume over threshold: no noise but voice else { volume = 0; } diff --git a/app/src/components/Settings/MediaSettings.js b/app/src/components/Settings/MediaSettings.js index 7a14495..d326b91 100644 --- a/app/src/components/Settings/MediaSettings.js +++ b/app/src/components/Settings/MediaSettings.js @@ -29,7 +29,7 @@ const NoiseSlider = withStyles( }, rail : { height : 2, - opacity : 0.2, + opacity : 0.2 }, mark : { backgroundColor : '#bfbfbf', @@ -50,7 +50,7 @@ const styles = (theme) => ({ }, margin : { - height : theme.spacing(3), + height : theme.spacing(3) }, formControl : { @@ -173,7 +173,8 @@ const MediaSettings = ({