mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
465831175a
Summary: Autolinker is a great open source project but it attempts to parse HTML with regexp, is quite slow, and hangs on specific emails https://github.com/nylas/N1/issues/1540 This is super bad, and also super unnecessary. I think this should do the trick. Note: I changed the urlRegex in our Utils to be much more liberal. It now matches anything that looks like a URL, not just things with the http:// and https:// prefixes. It's used in the LinkEditor and onboarding screen (detecting auth errors with urls) and I think it should be ok? Test Plan: Need to write some tests Reviewers: evan, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D2725
62 lines
2.3 KiB
CoffeeScript
62 lines
2.3 KiB
CoffeeScript
MessageList = require "./message-list"
|
|
MessageListHiddenMessagesToggle = require './message-list-hidden-messages-toggle'
|
|
MessageToolbarItems = require "./message-toolbar-items"
|
|
{ComponentRegistry,
|
|
ExtensionRegistry,
|
|
WorkspaceStore} = require 'nylas-exports'
|
|
|
|
SidebarPluginContainer = require "./sidebar-plugin-container"
|
|
SidebarParticipantPicker = require './sidebar-participant-picker'
|
|
|
|
ThreadStarButton = require './thread-star-button'
|
|
ThreadArchiveButton = require './thread-archive-button'
|
|
ThreadTrashButton = require './thread-trash-button'
|
|
ThreadToggleUnreadButton = require './thread-toggle-unread-button'
|
|
|
|
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 SidebarParticipantPicker,
|
|
location: WorkspaceStore.Location.MessageListSidebar
|
|
ComponentRegistry.register SidebarPluginContainer,
|
|
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 TrackingPixelsExtension
|
|
|
|
deactivate: ->
|
|
ComponentRegistry.unregister MessageList
|
|
ComponentRegistry.unregister ThreadStarButton
|
|
ComponentRegistry.unregister ThreadArchiveButton
|
|
ComponentRegistry.unregister ThreadTrashButton
|
|
ComponentRegistry.unregister ThreadToggleUnreadButton
|
|
ComponentRegistry.unregister MessageToolbarItems
|
|
ComponentRegistry.unregister SidebarPluginContainer
|
|
ComponentRegistry.unregister SidebarParticipantPicker
|
|
ExtensionRegistry.MessageView.unregister TrackingPixelsExtension
|
|
|
|
serialize: -> @state
|