2016-02-19 02:00:11 +08:00
|
|
|
import {ComponentRegistry} from 'nylas-exports';
|
2016-09-13 14:23:39 +08:00
|
|
|
import {HasTutorialTip} from 'nylas-component-kit';
|
|
|
|
|
2016-03-18 00:50:30 +08:00
|
|
|
import {ToolbarSnooze, QuickActionSnooze} from './snooze-buttons';
|
2016-02-26 05:06:01 +08:00
|
|
|
import SnoozeMailLabel from './snooze-mail-label'
|
2016-02-19 02:00:11 +08:00
|
|
|
import SnoozeStore from './snooze-store'
|
|
|
|
|
|
|
|
|
|
|
|
export function activate() {
|
|
|
|
this.snoozeStore = new SnoozeStore()
|
2016-03-04 04:37:20 +08:00
|
|
|
|
2016-09-13 14:23:39 +08:00
|
|
|
const ToolbarSnoozeWithTutorialTip = HasTutorialTip(ToolbarSnooze, {
|
|
|
|
title: "Handle it later!",
|
|
|
|
instructions: "Snooze this email and it'll return to your inbox later. Click here or swipe across the thread in your inbox to snooze.",
|
|
|
|
});
|
|
|
|
|
2016-03-04 04:37:20 +08:00
|
|
|
this.snoozeStore.activate()
|
2016-09-13 14:23:39 +08:00
|
|
|
ComponentRegistry.register(ToolbarSnoozeWithTutorialTip, {role: 'ThreadActionsToolbarButton'});
|
2016-03-10 02:01:18 +08:00
|
|
|
ComponentRegistry.register(QuickActionSnooze, {role: 'ThreadListQuickAction'});
|
2016-03-03 02:05:17 +08:00
|
|
|
ComponentRegistry.register(SnoozeMailLabel, {role: 'Thread:MailLabel'});
|
2016-02-19 02:00:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export function deactivate() {
|
|
|
|
ComponentRegistry.unregister(ToolbarSnooze);
|
2016-03-10 02:01:18 +08:00
|
|
|
ComponentRegistry.unregister(QuickActionSnooze);
|
2016-02-26 05:06:01 +08:00
|
|
|
ComponentRegistry.unregister(SnoozeMailLabel);
|
2016-02-19 02:00:11 +08:00
|
|
|
this.snoozeStore.deactivate()
|
|
|
|
}
|
|
|
|
|
|
|
|
export function serialize() {
|
|
|
|
|
|
|
|
}
|