diff --git a/frontend/src/components/EncryptedChat.js b/frontend/src/components/EncryptedChat.js index a203fe35..04788ceb 100644 --- a/frontend/src/components/EncryptedChat.js +++ b/frontend/src/components/EncryptedChat.js @@ -144,11 +144,13 @@ class Chat extends Component { } componentDidUpdate() { - - // Only fire the scroll when the reason for Update is a new message + + // Only fire the scroll and audio when the reason for Update is a new message if (this.state.scrollNow){ + const audio = new Audio(`/static/assets/sounds/chat-open.mp3`) + audio.play(); this.scrollToBottom(); - this.setState({scrollNow:false}) + this.setState({scrollNow:false}); } } diff --git a/frontend/src/components/TradeBox.js b/frontend/src/components/TradeBox.js index c9490fa4..fb268ceb 100644 --- a/frontend/src/components/TradeBox.js +++ b/frontend/src/components/TradeBox.js @@ -52,12 +52,6 @@ class TradeBox extends Component {