2016-03-08 12:54:43 +08:00
|
|
|
|
2016-02-26 04:48:05 +08:00
|
|
|
import {ComponentRegistry, ExtensionRegistry, Actions} from 'nylas-exports';
|
2016-02-20 04:30:24 +08:00
|
|
|
import OpenTrackingButton from './open-tracking-button';
|
|
|
|
import OpenTrackingIcon from './open-tracking-icon';
|
2016-02-24 07:22:55 +08:00
|
|
|
import OpenTrackingMessageStatus from './open-tracking-message-status';
|
2016-03-08 12:54:43 +08:00
|
|
|
import OpenTrackingAfterSend from './open-tracking-after-send';
|
2016-02-20 04:30:24 +08:00
|
|
|
import OpenTrackingComposerExtension from './open-tracking-composer-extension';
|
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
ComponentRegistry.register(OpenTrackingButton, {role: 'Composer:ActionButton'});
|
|
|
|
ComponentRegistry.register(OpenTrackingIcon, {role: 'ThreadListIcon'});
|
2016-02-24 07:22:55 +08:00
|
|
|
ComponentRegistry.register(OpenTrackingMessageStatus, {role: 'MessageHeaderStatus'});
|
2016-02-20 04:30:24 +08:00
|
|
|
ExtensionRegistry.Composer.register(OpenTrackingComposerExtension);
|
2016-03-08 12:54:43 +08:00
|
|
|
this._unlistenSendDraftSuccess = Actions.sendDraftSuccess.listen(OpenTrackingAfterSend.afterDraftSend);
|
2016-02-20 04:30:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function serialize() {}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(OpenTrackingButton);
|
|
|
|
ComponentRegistry.unregister(OpenTrackingIcon);
|
2016-02-24 17:04:57 +08:00
|
|
|
ComponentRegistry.unregister(OpenTrackingMessageStatus);
|
2016-02-20 04:30:24 +08:00
|
|
|
ExtensionRegistry.Composer.unregister(OpenTrackingComposerExtension);
|
|
|
|
this._unlistenSendDraftSuccess()
|
|
|
|
}
|