getDerivedStateFromProps refactored in contacts-view and chips-input, #35

This commit is contained in:
or-else
2019-08-14 20:24:07 +03:00
parent a79373c8cd
commit f1744c3f69
7 changed files with 88 additions and 40 deletions
+2 -2
View File
@@ -538,14 +538,14 @@ class TinodeWeb extends React.Component {
// New message received
if (document.hidden) {
if (this.state.messageSounds && !isArchived) {
if (this.state.messageSounds && !archived) {
POP_SOUND.play();
}
this.resetContactList();
// Skip update if the topic is currently open, otherwise the badge will annoyingly flash.
} else if (this.state.topicSelected != cont.topic) {
if (this.state.messageSounds && !isArchived) {
if (this.state.messageSounds && !archived) {
POP_SOUND.play();
}
this.resetContactList();