make sure unread is > 0 before playing a sound
This commit is contained in:
+12
-10
@@ -4948,18 +4948,20 @@ var TinodeWeb = function (_React$Component) {
|
||||
var topic = this.tinode.getTopic(cont.topic);
|
||||
var archived = topic && topic.isArchived();
|
||||
|
||||
if (document.hidden) {
|
||||
if (this.state.messageSounds && !archived) {
|
||||
POP_SOUND.play();
|
||||
}
|
||||
if (cont.unread > 0) {
|
||||
if (document.hidden) {
|
||||
if (this.state.messageSounds && !archived) {
|
||||
POP_SOUND.play();
|
||||
}
|
||||
|
||||
this.resetContactList();
|
||||
} else if (this.state.topicSelected != cont.topic) {
|
||||
if (this.state.messageSounds && !archived) {
|
||||
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') {
|
||||
if (this.state.topicSelected == cont.topic) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user