React = require 'react' _ = require 'underscore' {RetinaImg, Flexbox} = require 'nylas-component-kit' {LaunchServices, AccountStore} = require 'nylas-exports' class PreferencesGeneral extends React.Component @displayName: 'PreferencesGeneral' constructor: (@props) -> @state = {} @_services = new LaunchServices() if @_services.available() @_services.isRegisteredForURLScheme 'mailto', (registered) => @setState(defaultClient: registered) toggleDefaultMailClient: => if @state.defaultClient is true @setState(defaultClient: false) @_services.resetURLScheme('mailto') else @setState(defaultClient: true) @_services.registerForURLScheme('mailto') toggleShowImportant: (event) => @props.config.toggle('core.showImportant') event.preventDefault() toggleShowSystemTrayIcon: (event) => @props.config.toggle('core.showSystemTray') event.preventDefault() _renderImportanceOptionElement: => return false unless AccountStore.current()?.usesImportantFlag() importanceOptionElement =
render: =>
{@_renderImportanceOptionElement()}
Delay for marking messages as read:
Download attachments for new mail:
Default reply behavior:
@props.config.set('core.sending.defaultReplyType', 'reply') }/>
@props.config.set('core.sending.defaultReplyType', 'reply-all') }/>
module.exports = PreferencesGeneral