mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Rename File and Directory 'contents-change' to 'contents-changed'
This commit is contained in:
@@ -55,7 +55,7 @@ class Buffer
|
||||
this
|
||||
|
||||
subscribeToFile: ->
|
||||
@file.on "contents-change", =>
|
||||
@file.on "contents-changed", =>
|
||||
if @isModified()
|
||||
@conflict = true
|
||||
@updateCachedDiskContents()
|
||||
|
||||
@@ -35,7 +35,7 @@ class Directory
|
||||
|
||||
subscribeToNativeChangeEvents: ->
|
||||
@watchId = $native.watchPath @path, (eventType) =>
|
||||
@trigger "contents-change" if eventType is "contents-change"
|
||||
@trigger "contents-changed" if eventType is "contents-change"
|
||||
|
||||
unsubscribeFromNativeChangeEvents: ->
|
||||
$native.unwatchPath(@path, @watchId)
|
||||
|
||||
@@ -52,7 +52,7 @@ class File
|
||||
oldContents = @read()
|
||||
newContents = @read(true)
|
||||
return if oldContents == newContents
|
||||
@trigger 'contents-change'
|
||||
@trigger 'contents-changed'
|
||||
|
||||
detectResurrectionAfterDelay: ->
|
||||
_.delay (=> @detectResurrection()), 50
|
||||
|
||||
Reference in New Issue
Block a user