2016-02-26 04:48:05 +08:00
|
|
|
import {ComponentRegistry, ExtensionRegistry, Actions} from 'nylas-exports';
|
2016-02-20 04:30:24 +08:00
|
|
|
import LinkTrackingButton from './link-tracking-button';
|
|
|
|
import LinkTrackingComposerExtension from './link-tracking-composer-extension';
|
2016-02-24 10:20:26 +08:00
|
|
|
import LinkTrackingMessageExtension from './link-tracking-message-extension';
|
2016-03-08 12:54:43 +08:00
|
|
|
import LinkTrackingAfterSend from './link-tracking-after-send';
|
2016-02-20 04:30:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
ComponentRegistry.register(LinkTrackingButton, {role: 'Composer:ActionButton'});
|
|
|
|
ExtensionRegistry.Composer.register(LinkTrackingComposerExtension);
|
2016-02-24 10:20:26 +08:00
|
|
|
ExtensionRegistry.MessageView.register(LinkTrackingMessageExtension);
|
2016-03-08 12:54:43 +08:00
|
|
|
this._unlistenSendDraftSuccess = Actions.sendDraftSuccess.listen(LinkTrackingAfterSend.afterDraftSend);
|
2016-02-20 04:30:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function serialize() {}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(LinkTrackingButton);
|
|
|
|
ExtensionRegistry.Composer.unregister(LinkTrackingComposerExtension);
|
2016-02-24 10:20:26 +08:00
|
|
|
ExtensionRegistry.MessageView.unregister(LinkTrackingMessageExtension);
|
2016-02-20 04:30:24 +08:00
|
|
|
this._unlistenSendDraftSuccess()
|
|
|
|
}
|