Hide notifications audio setting on Linux

This commit is contained in:
Daniel Gasienica 2018-02-26 11:28:37 -05:00
parent 21339c6866
commit dcf651fb51
2 changed files with 13 additions and 5 deletions

View file

@ -606,10 +606,12 @@
</div>
</div>
<br />
{{ #shouldShowAudioNotificationSetting }}
<div class='audio-notification-setting'>
<input type='checkbox' name='audio-notification' id='audio-notification'/>
<label for='audio-notification'>{{ audioNotificationDescription }}</label>
</div>
{{ /shouldShowAudioNotificationSetting }}
</div>
</script>
<script type='text/x-tmpl-mustache' id='syncSettings'>

View file

@ -4,6 +4,8 @@
(function () {
'use strict';
window.Whisper = window.Whisper || {};
const { OS } = window.Signal;
const { Settings } = window.Signal.Types;
var CheckboxView = Whisper.View.extend({
initialize: function(options) {
@ -68,11 +70,13 @@
name: 'theme-setting',
event: 'change-theme'
});
new CheckboxView({
el: this.$('.audio-notification-setting'),
defaultValue: false,
name: 'audio-notification'
});
if (Settings.shouldShowAudioNotificationSetting()) {
new CheckboxView({
el: this.$('.audio-notification-setting'),
defaultValue: false,
name: 'audio-notification'
});
}
new CheckboxView({
el: this.$('.menu-bar-setting'),
defaultValue: false,
@ -100,6 +104,8 @@
noNameOrMessage: i18n('noNameOrMessage'),
nameOnly: i18n('nameOnly'),
audioNotificationDescription: i18n('audioNotificationDescription'),
shouldShowAudioNotificationSetting:
Settings.shouldShowAudioNotificationSetting(),
themeAndroidDark: i18n('themeAndroidDark'),
hideMenuBar: i18n('hideMenuBar'),
};