Skip to content

Commit

Permalink
feat(spellcheck): Add option to disable spellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiehluo committed Jun 16, 2016
1 parent 36e0e07 commit 42e876a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal_packages/composer-spellcheck/lib/main.es6
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import {ExtensionRegistry} from 'nylas-exports';
import SpellcheckComposerExtension from './spellcheck-composer-extension';

export function activate() {
ExtensionRegistry.Composer.register(SpellcheckComposerExtension);
if (NylasEnv.config.get("core.composing.spellcheck")) {
ExtensionRegistry.Composer.register(SpellcheckComposerExtension);
}
}

export function deactivate() {
ExtensionRegistry.Composer.unregister(SpellcheckComposerExtension);
if (NylasEnv.config.get("core.composing.spellcheck")) {
ExtensionRegistry.Composer.unregister(SpellcheckComposerExtension);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const PreferencesGeneral = (props) => {
config={props.config}
/>

<ConfigSchemaItem
configSchema={props.configSchema.properties.composing}
keyName="Composing"
keyPath="core.composing"
config={props.config}
/>

<SendingSection config={props.config} configSchema={props.configSchema} />

<ConfigSchemaItem
Expand Down
7 changes: 7 additions & 0 deletions src/config-schema.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ module.exports =
type: 'boolean'
default: false
title: "Swipe gesture and backspace / delete move messages to trash"
composing:
type: 'object'
properties:
spellcheck:
type: 'boolean'
default: true
title: "Check messages for spelling"
sending:
type: 'object'
properties:
Expand Down

0 comments on commit 42e876a

Please sign in to comment.