mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
20 lines
456 B
CoffeeScript
20 lines
456 B
CoffeeScript
|
Reflux = require 'reflux'
|
||
|
_ = require 'underscore'
|
||
|
NylasStore = require 'nylas-store'
|
||
|
{Actions} = require 'nylas-exports'
|
||
|
|
||
|
class PreferencesStore extends NylasStore
|
||
|
constructor: ->
|
||
|
@_tabs = []
|
||
|
@listenTo Actions.registerPreferencesTab, @_registerTab
|
||
|
|
||
|
tabs: =>
|
||
|
@_tabs
|
||
|
|
||
|
_registerTab: (tabConfig) =>
|
||
|
@_tabs.push(tabConfig)
|
||
|
@_triggerSoon ?= _.debounce(( => @trigger()), 20)
|
||
|
@_triggerSoon()
|
||
|
|
||
|
module.exports = new PreferencesStore()
|