Merge pull request #7206 from diegobenetti/issue7195-audible-notifications
Fix audible notifications
This commit is contained in:
commit
6be7227108
@ -1,4 +1,4 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { PureComponent, Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { defineMessages, injectIntl } from 'react-intl';
|
import { defineMessages, injectIntl } from 'react-intl';
|
||||||
import { Session } from 'meteor/session';
|
import { Session } from 'meteor/session';
|
||||||
@ -117,10 +117,8 @@ class ChatAlert extends PureComponent {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!pushAlertDisabled) {
|
|
||||||
this.setChatMessagesState(newPendingNotificationsByChat, newLastAlertTimestampByChat);
|
this.setChatMessagesState(newPendingNotificationsByChat, newLastAlertTimestampByChat);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setAlertEnabledTimestamp(newAlertEnabledTimestamp) {
|
setAlertEnabledTimestamp(newAlertEnabledTimestamp) {
|
||||||
const { alertEnabledTimestamp } = this.state;
|
const { alertEnabledTimestamp } = this.state;
|
||||||
@ -178,7 +176,7 @@ class ChatAlert extends PureComponent {
|
|||||||
const shouldPlay = Object.keys(pendingNotificationsByChat).length > 0;
|
const shouldPlay = Object.keys(pendingNotificationsByChat).length > 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<Fragment>
|
||||||
{!audioAlertDisabled ? <ChatAudioAlert play={shouldPlay} /> : null}
|
{!audioAlertDisabled ? <ChatAudioAlert play={shouldPlay} /> : null}
|
||||||
{
|
{
|
||||||
!pushAlertDisabled
|
!pushAlertDisabled
|
||||||
@ -216,7 +214,7 @@ class ChatAlert extends PureComponent {
|
|||||||
})
|
})
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
</span>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user