mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-27 09:36:28 +08:00
Summary: This diff implements Gmails "load images, always load images from bengotow@gmail.com" option. Someone asked for it late last night and I figured it'd be fun to add. We also needed to refactor the MessageItem to allow for a GPG plugin - MessageItems now subscribe to the body of the message from the messageBodyProcessor, so in the event that processing rules change, someone can invalidate the processor cache by calling `resetCache()`, and then it recomputes bodies and triggers a refresh of each message body. Test Plan: Updated existing tests, no new tests for this plugin just yet. Reviewers: evan, juan Reviewed By: evan Differential Revision: https://phab.nylas.com/D2235
21 lines
674 B
CoffeeScript
21 lines
674 B
CoffeeScript
{ComponentRegistry,
|
|
MessageStore,
|
|
WorkspaceStore} = require 'nylas-exports'
|
|
|
|
AutoloadImagesExtension = require './autoload-images-extension'
|
|
AutoloadImagesHeader = require './autoload-images-header'
|
|
|
|
module.exports =
|
|
item: null # The DOM item the main React component renders into
|
|
|
|
activate: (@state={}) ->
|
|
# Register Message List Actions we provide globally
|
|
MessageStore.registerExtension(AutoloadImagesExtension)
|
|
ComponentRegistry.register AutoloadImagesHeader,
|
|
role: 'message:BodyHeader'
|
|
|
|
deactivate: ->
|
|
MessageStore.unregisterExtension(AutoloadImagesExtension)
|
|
ComponentRegistry.unregister(AutoloadImagesHeader)
|
|
|
|
serialize: -> @state
|