This commit is contained in:
or-else
2019-11-20 11:49:06 +03:00
parent dce1875de4
commit b48e4e63d9
6 changed files with 10 additions and 21 deletions
+5 -13
View File
@@ -4948,21 +4948,13 @@ var TinodeWeb = function (_React$Component) {
var topic = this.tinode.getTopic(cont.topic); var topic = this.tinode.getTopic(cont.topic);
var archived = topic && topic.isArchived(); var archived = topic && topic.isArchived();
if (cont.unread > 0) { if (cont.unread > 0 && this.state.messageSounds && !archived) {
if (document.hidden) { if (document.hidden || this.state.topicSelected != cont.topic) {
if (this.state.messageSounds && !archived) { POP_SOUND.play();
POP_SOUND.play();
}
this.resetContactList();
} else if (this.state.topicSelected != cont.topic) {
if (this.state.messageSounds && !archived) {
POP_SOUND.play();
}
this.resetContactList();
} }
} }
this.resetContactList();
} else if (what == 'recv') {} else if (what == 'gone' || what == 'unsub') { } else if (what == 'recv') {} else if (what == 'gone' || what == 'unsub') {
if (this.state.topicSelected == cont.topic) { if (this.state.topicSelected == cont.topic) {
this.handleTopicSelected(null); this.handleTopicSelected(null);
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long