Mailspring/internal_packages/plugins/lib/tabs-store.coffee
Ben Gotow 528c8850ce bump(electron): 0.34.3 => 0.35.1
Electron 0.35.1 includes the tray fixes we contributed last week but also includes API restructuring and improvements. Most importantly, modules from electron are now imported via `require('electron')`
2015-11-23 22:09:17 -08:00

23 lines
377 B
CoffeeScript

_ = require 'underscore'
Reflux = require 'reflux'
PluginsActions = require './plugins-actions'
module.exports =
TabsStore = Reflux.createStore
init: ->
@_tabIndex = 0
@listenTo(PluginsActions.selectTabIndex, @_onTabIndexChanged)
# Getters
tabIndex: ->
@_tabIndex
# Action Handlers
_onTabIndexChanged: (idx) ->
@_tabIndex = idx
@trigger(@)