Open separate windows with theme, update settings theme on change

This commit is contained in:
Scott Nonnenberg 2018-07-13 08:57:30 -07:00
parent d014fa779e
commit d8e5e5fcf2
10 changed files with 38 additions and 14 deletions

View file

@ -1,5 +1,6 @@
/* global i18n: false */
/* global Whisper: false */
/* global $: false */
/* eslint-disable no-new */
@ -82,7 +83,14 @@
el: this.$('.theme-settings'),
name: 'theme-setting',
value: window.initialData.themeSetting,
setFn: window.setThemeSetting,
setFn: theme => {
$(document.body)
.removeClass('android')
.removeClass('android-dark')
.removeClass('ios')
.addClass(theme);
window.setThemeSetting(theme);
},
});
if (Settings.isAudioNotificationSupported()) {
new CheckboxView({