mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
4619871e8d
Summary: Fixes: T1334 remove final InboxApp references move out all underscore-plus methods Mass find and replace of underscore-plus sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1534
20 lines
513 B
CoffeeScript
20 lines
513 B
CoffeeScript
Reflux = require 'reflux'
|
|
_ = require 'underscore'
|
|
{File,
|
|
DatabaseStore,
|
|
DatabaseView} = require 'nylas-exports'
|
|
|
|
module.exports =
|
|
FileListStore = Reflux.createStore
|
|
init: ->
|
|
@listenTo DatabaseStore, @_onDataChanged
|
|
|
|
@_view = new DatabaseView(File, matchers: [File.attributes.filename.not('')])
|
|
@listenTo @_view, => @trigger({})
|
|
|
|
view: ->
|
|
@_view
|
|
|
|
_onDataChanged: (change) ->
|
|
return unless change.objectClass is File.name
|
|
@_view.invalidate({shallow: true, changed: change.objects})
|