Refresh the Git index when the window gains focus

Closes #121
This commit is contained in:
Kevin Sawicki
2013-01-07 17:29:20 -08:00
parent 1535930521
commit 146ae9d776
3 changed files with 21 additions and 7 deletions

View File

@@ -1,3 +1,5 @@
$ = require 'jquery'
module.exports =
class Git
@@ -15,6 +17,9 @@ class Git
constructor: (path) ->
@repo = new GitRepository(path)
$(window).on 'focus', => @refreshIndex()
refreshIndex: -> @repo.refreshIndex()
getPath: -> @repo.getPath()