diff --git a/webapp/components/user_settings/desktop_notification_settings.jsx b/webapp/components/user_settings/desktop_notification_settings.jsx index 79d500c882..abdbff5126 100644 --- a/webapp/components/user_settings/desktop_notification_settings.jsx +++ b/webapp/components/user_settings/desktop_notification_settings.jsx @@ -5,7 +5,6 @@ import SettingItemMin from 'components/setting_item_min.jsx'; import SettingItemMax from 'components/setting_item_max.jsx'; import * as Utils from 'utils/utils.jsx'; -import * as UserAgent from 'utils/user_agent.jsx'; import PropTypes from 'prop-types'; @@ -45,24 +44,7 @@ export default class DesktopNotificationSettings extends React.Component { soundRadio[0] = true; } - if (UserAgent.isFirefox()) { - soundSection = ( -
-
- -
- -
- ); - } else { + if (Utils.hasSoundOptions()) { soundSection = (

@@ -109,11 +91,28 @@ export default class DesktopNotificationSettings extends React.Component {
); + } else { + soundSection = ( +
+
+ +
+ +
+ ); } const durationRadio = [false, false, false, false]; @@ -304,26 +303,26 @@ export default class DesktopNotificationSettings extends React.Component { buildMinimizedSetting() { let describe = ''; if (this.props.activity === 'mention') { - if (UserAgent.isFirefox()) { - if (this.props.duration === '0') { + if (Utils.hasSoundOptions() && this.props.sound !== 'false') { + if (this.props.duration === '0') { //eslint-disable-line no-lonely-if describe = ( ); } else { describe = ( ); } - } else if (this.props.sound === 'false') { + } else if (Utils.hasSoundOptions() && this.props.sound === 'false') { if (this.props.duration === '0') { describe = ( ); } else { describe = ( ); } else { - if (UserAgent.isFirefox()) { //eslint-disable-line no-lonely-if - if (this.props.duration === '0') { + if (Utils.hasSoundOptions() && this.props.sound !== 'false') { //eslint-disable-line no-lonely-if + if (this.props.duration === '0') { //eslint-disable-line no-lonely-if describe = ( ); } else { describe = ( ); } - } else if (this.props.sound === 'false') { + } else if (Utils.hasSoundOptions() && this.props.sound === 'false') { if (this.props.duration === '0') { describe = ( ); } else { describe = (