Mailspring/internal_packages/composer-signature/lib/main.coffee
Juan Tejada 9f87ab25dd fix(signature): Update signature when account is changed in composer
Summary:
- Fixes #1239
- Adds action in composer view to indicate when draft partcipants have
  changed. This seemed like the simplest way to listen for this change without
  adding another extension point
- Updates signature plugin to listen to this action and update signature
  accordingly
- Adds test

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2614
2016-02-24 00:19:55 -08:00

23 lines
797 B
CoffeeScript

{PreferencesUIStore, ExtensionRegistry} = require 'nylas-exports'
SignatureComposerExtension = require './signature-composer-extension'
SignatureStore = require './signature-store'
module.exports =
activate: ->
@preferencesTab = new PreferencesUIStore.TabItem
tabId: "Signatures"
displayName: "Signatures"
component: require "./preferences-signatures"
ExtensionRegistry.Composer.register(SignatureComposerExtension)
PreferencesUIStore.registerPreferencesTab(@preferencesTab)
@signatureStore = new SignatureStore()
@signatureStore.activate()
deactivate: ->
ExtensionRegistry.Composer.unregister(SignatureComposerExtension)
PreferencesUIStore.unregisterPreferencesTab(@preferencesTab.sectionId)
@signatureStore.deactivate()
serialize: ->