mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-24 03:46:03 +08:00
Simpilfy auto_updater api.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
AutoUpdater = process.atomBinding('auto_updater').AutoUpdater
|
||||
autoUpdater = process.atomBinding('auto_updater').autoUpdater
|
||||
EventEmitter = require('events').EventEmitter
|
||||
|
||||
AutoUpdater::__proto__ = EventEmitter.prototype
|
||||
autoUpdater.__proto__ = EventEmitter.prototype
|
||||
|
||||
autoUpdater = new AutoUpdater
|
||||
autoUpdater.on 'update-downloaded-raw', (args...) ->
|
||||
args[3] = new Date(args[3]) # releaseDate
|
||||
@emit 'update-downloaded', args..., => @quitAndInstall()
|
||||
|
||||
Reference in New Issue
Block a user