diff --git a/app/internal_packages/composer-signature/specs/signature-composer-extension-spec.es6 b/app/internal_packages/composer-signature/specs/signature-composer-extension-spec.es6 index 6e9136996..f444aef9a 100644 --- a/app/internal_packages/composer-signature/specs/signature-composer-extension-spec.es6 +++ b/app/internal_packages/composer-signature/specs/signature-composer-extension-spec.es6 @@ -16,7 +16,7 @@ describe('SignatureComposerExtension', function signatureComposerExtension() { describe('when a signature is defined', () => { beforeEach(() => { spyOn(AppEnv.config, 'get').andCallFake( - key => (key === 'nylas.signatures' ? TEST_SIGNATURES : null) + key => (key === 'signatures' ? TEST_SIGNATURES : null) ); spyOn(SignatureStore, 'signatureForEmail').andReturn(TEST_SIGNATURE); SignatureStore.activate(); diff --git a/app/internal_packages/composer-signature/specs/signature-store-spec.jsx b/app/internal_packages/composer-signature/specs/signature-store-spec.jsx index bbd98ec6a..e2f939e4a 100644 --- a/app/internal_packages/composer-signature/specs/signature-store-spec.jsx +++ b/app/internal_packages/composer-signature/specs/signature-store-spec.jsx @@ -22,12 +22,10 @@ const DEFAULTS = { describe('SignatureStore', function signatureStore() { beforeEach(() => { - spyOn(AppEnv.config, 'get').andCallFake( - key => (key === 'nylas.signatures' ? SIGNATURES : null) - ); + spyOn(AppEnv.config, 'get').andCallFake(key => (key === 'signatures' ? SIGNATURES : null)); spyOn(SignatureStore, '_saveSignatures').andCallFake(() => { - AppEnv.config.set(`nylas.signatures`, SignatureStore.signatures); + AppEnv.config.set(`signatures`, SignatureStore.signatures); }); spyOn(SignatureStore, 'signatureForEmail').andCallFake(email => SIGNATURES[DEFAULTS[email]]); spyOn(SignatureStore, 'selectedSignature').andCallFake(() => SIGNATURES['1']); @@ -46,7 +44,7 @@ describe('SignatureStore', function signatureStore() { describe('removeSignature', () => { beforeEach(() => { spyOn(AppEnv.config, 'set').andCallFake((key, newObject) => { - if (key === 'nylas.signatures') { + if (key === 'signatures') { SIGNATURES = newObject; } }); diff --git a/app/src/flux/stores/signature-store.es6 b/app/src/flux/stores/signature-store.es6 index fdbd22db5..1d2af8223 100644 --- a/app/src/flux/stores/signature-store.es6 +++ b/app/src/flux/stores/signature-store.es6 @@ -12,8 +12,8 @@ class SignatureStore extends MailspringStore { } activate() { - this.signatures = AppEnv.config.get(`nylas.signatures`) || {}; - this.defaultSignatures = AppEnv.config.get(`nylas.defaultSignatures`) || {}; + this.signatures = AppEnv.config.get(`signatures`) || {}; + this.defaultSignatures = AppEnv.config.get(`defaultSignatures`) || {}; this._autoselectSignatureId(); if (!this.unsubscribers) { @@ -25,12 +25,12 @@ class SignatureStore extends MailspringStore { Actions.toggleAccount.listen(this._onToggleAccount), ]; - AppEnv.config.onDidChange(`nylas.signatures`, () => { - this.signatures = AppEnv.config.get(`nylas.signatures`); + AppEnv.config.onDidChange(`signatures`, () => { + this.signatures = AppEnv.config.get(`signatures`); this.trigger(); }); - AppEnv.config.onDidChange(`nylas.defaultSignatures`, () => { - this.defaultSignatures = AppEnv.config.get(`nylas.defaultSignatures`); + AppEnv.config.onDidChange(`defaultSignatures`, () => { + this.defaultSignatures = AppEnv.config.get(`defaultSignatures`); this.trigger(); }); } @@ -63,11 +63,11 @@ class SignatureStore extends MailspringStore { }; _saveSignatures() { - _.debounce(AppEnv.config.set(`nylas.signatures`, this.signatures), 500); + _.debounce(AppEnv.config.set(`signatures`, this.signatures), 500); } _saveDefaultSignatures() { - _.debounce(AppEnv.config.set(`nylas.defaultSignatures`, this.defaultSignatures), 500); + _.debounce(AppEnv.config.set(`defaultSignatures`, this.defaultSignatures), 500); } _onSelectSignature = id => {