New option: Disable spell check

This commit is contained in:
Scott Nonnenberg 2018-07-18 18:46:12 -07:00
parent d5d6cdb250
commit c517e4193b
9 changed files with 78 additions and 9 deletions

View file

@ -160,6 +160,12 @@
getAudioNotification: () => storage.get('audio-notification'),
setAudioNotification: value => storage.put('audio-notification', value),
getSpellCheck: () => storage.get('spell-check', true),
setSpellCheck: value => {
storage.put('spell-check', value);
startSpellCheck();
},
// eslint-disable-next-line eqeqeq
isPrimary: () => textsecure.storage.user.getDeviceId() == '1',
getSyncRequest: () =>
@ -185,6 +191,15 @@
},
};
const startSpellCheck = () => {
if (window.Events.getSpellCheck()) {
window.enableSpellCheck();
} else {
window.disableSpellCheck();
}
};
startSpellCheck();
const themeSetting = window.Events.getThemeSetting();
const newThemeSetting = mapOldThemeToNew(themeSetting);
window.Events.setThemeSetting(newThemeSetting);