mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
f46502ad3e
Summary: - Also refactors the code a bit for testability and maintainability - Fixes #1515 Test Plan: - Unit tests Reviewers: evan, drew, bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D2651
29 lines
1,016 B
JavaScript
29 lines
1,016 B
JavaScript
/** @babel */
|
|
import {ComponentRegistry} from 'nylas-exports';
|
|
import {ToolbarSnooze, BulkThreadSnooze} from './snooze-toolbar-components';
|
|
import SnoozeQuickActionButton from './snooze-quick-action-button'
|
|
import SnoozeMailLabel from './snooze-mail-label'
|
|
import SnoozeStore from './snooze-store'
|
|
|
|
|
|
export function activate() {
|
|
this.snoozeStore = new SnoozeStore()
|
|
|
|
this.snoozeStore.activate()
|
|
ComponentRegistry.register(ToolbarSnooze, {role: 'message:Toolbar'});
|
|
ComponentRegistry.register(SnoozeQuickActionButton, {role: 'ThreadListQuickAction'});
|
|
ComponentRegistry.register(BulkThreadSnooze, {role: 'thread:BulkAction'});
|
|
ComponentRegistry.register(SnoozeMailLabel, {role: 'Thread:MailLabel'});
|
|
}
|
|
|
|
export function deactivate() {
|
|
ComponentRegistry.unregister(ToolbarSnooze);
|
|
ComponentRegistry.unregister(SnoozeQuickActionButton);
|
|
ComponentRegistry.unregister(BulkThreadSnooze);
|
|
ComponentRegistry.unregister(SnoozeMailLabel);
|
|
this.snoozeStore.deactivate()
|
|
}
|
|
|
|
export function serialize() {
|
|
|
|
}
|