Mailspring/internal_packages/message-list/lib/main.cjsx
Evan Morikawa ae69790024 feat(archive): shows trash for non-archive accounts
Summary:
Fixes T3570
Fixes T3737

Rename ArchiveThreadHelper to RemoveThreadHelper

Rename of `getRemovalTask`

Remove unarchive from `RemoveThreadHelper`. Pass in mailviewfilter

Rename actions

Rename archive action

renmaing

support trash and archive folders in RemoveThreadHelper

Move everything over to trash

add tests

Hide trash and archive

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3570, T3737

Differential Revision: https://phab.nylas.com/D2089
2015-09-30 19:51:48 -07:00

60 lines
2.2 KiB
CoffeeScript

MessageList = require "./message-list"
MessageToolbarItems = require "./message-toolbar-items"
{ComponentRegistry,
MessageStore,
WorkspaceStore} = require 'nylas-exports'
{SidebarContactCard,
SidebarSpacer,
SidebarContactList} = require "./sidebar-components"
ThreadStarButton = require './thread-star-button'
ThreadRemoveButton = require './thread-remove-button'
ThreadToggleUnreadButton = require './thread-toggle-unread-button'
AutolinkerExtension = require './plugins/autolinker-extension'
TrackingPixelsExtension = require './plugins/tracking-pixels-extension'
module.exports =
item: null # The DOM item the main React component renders into
activate: (@state={}) ->
# Register Message List Actions we provide globally
ComponentRegistry.register MessageList,
location: WorkspaceStore.Location.MessageList
ComponentRegistry.register MessageToolbarItems,
location: WorkspaceStore.Location.MessageList.Toolbar
ComponentRegistry.register SidebarContactCard,
location: WorkspaceStore.Location.MessageListSidebar
ComponentRegistry.register SidebarSpacer,
location: WorkspaceStore.Location.MessageListSidebar
ComponentRegistry.register SidebarContactList,
location: WorkspaceStore.Location.MessageListSidebar
ComponentRegistry.register ThreadStarButton,
role: 'message:Toolbar'
ComponentRegistry.register ThreadRemoveButton,
role: 'message:Toolbar'
ComponentRegistry.register ThreadToggleUnreadButton,
role: 'message:Toolbar'
MessageStore.registerExtension(AutolinkerExtension)
MessageStore.registerExtension(TrackingPixelsExtension)
deactivate: ->
ComponentRegistry.unregister MessageList
ComponentRegistry.unregister ThreadStarButton
ComponentRegistry.unregister ThreadRemoveButton
ComponentRegistry.unregister ThreadToggleUnreadButton
ComponentRegistry.unregister MessageToolbarItems
ComponentRegistry.unregister SidebarContactCard
ComponentRegistry.unregister SidebarSpacer
ComponentRegistry.unregister SidebarContactList
MessageStore.unregisterExtension(AutolinkerExtension)
MessageStore.unregisterExtension(TrackingPixelsExtension)
serialize: -> @state