Mailspring/internal_packages/message-list/lib/main.cjsx
Ben Gotow f413386b80 feat(hidden-messages): Filter trash/spam messages. Fixes #1135
Summary:
By default, the messages in a thread are now filtered to exclude
ones moved to trash or spam. You can choose to view those messages by clicking
the new bar in the message list.

When you view your spam or trash, we only show the messages on those threads
that have been marked as spam/trash.

Test Plan: Run a couple new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2662
2016-03-02 10:05:17 -08:00

69 lines
2.6 KiB
CoffeeScript

MessageList = require "./message-list"
MessageListHiddenMessagesToggle = require './message-list-hidden-messages-toggle'
MessageToolbarItems = require "./message-toolbar-items"
{ComponentRegistry,
ExtensionRegistry,
WorkspaceStore} = require 'nylas-exports'
{SidebarContactCard,
SidebarSpacer,
SidebarContactList} = require "./sidebar-components"
ThreadStarButton = require './thread-star-button'
ThreadArchiveButton = require './thread-archive-button'
ThreadTrashButton = require './thread-trash-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 ThreadArchiveButton,
role: 'message:Toolbar'
ComponentRegistry.register ThreadTrashButton,
role: 'message:Toolbar'
ComponentRegistry.register ThreadToggleUnreadButton,
role: 'message:Toolbar'
ComponentRegistry.register MessageListHiddenMessagesToggle,
role: 'MessageListHeaders'
ExtensionRegistry.MessageView.register AutolinkerExtension
ExtensionRegistry.MessageView.register TrackingPixelsExtension
deactivate: ->
ComponentRegistry.unregister MessageList
ComponentRegistry.unregister ThreadStarButton
ComponentRegistry.unregister ThreadArchiveButton
ComponentRegistry.unregister ThreadTrashButton
ComponentRegistry.unregister ThreadToggleUnreadButton
ComponentRegistry.unregister MessageToolbarItems
ComponentRegistry.unregister SidebarContactCard
ComponentRegistry.unregister SidebarSpacer
ComponentRegistry.unregister SidebarContactList
ExtensionRegistry.MessageView.unregister AutolinkerExtension
ExtensionRegistry.MessageView.unregister TrackingPixelsExtension
serialize: -> @state