mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
Add mechanism to get the AutoUpdateManager's state
This commit is contained in:
@@ -37,6 +37,10 @@ export default class AutoUpdateManager {
|
||||
ipcRenderer.send('install-update')
|
||||
}
|
||||
|
||||
getState () {
|
||||
return ipcRenderer.sendSync('get-auto-update-manager-state')
|
||||
}
|
||||
|
||||
platformSupportsUpdates () {
|
||||
return this.getReleaseChannel() == 'stable' && (this.getPlatform() === 'darwin' || this.getPlatform() === 'win32')
|
||||
}
|
||||
|
||||
@@ -307,6 +307,9 @@ class AtomApplication
|
||||
ipcMain.on 'check-for-update', =>
|
||||
@autoUpdateManager.check()
|
||||
|
||||
ipcMain.on 'get-auto-update-manager-state', (event) =>
|
||||
event.returnValue = @autoUpdateManager.getState()
|
||||
|
||||
ipcMain.on 'execute-javascript-in-dev-tools', (event, code) ->
|
||||
event.sender.devToolsWebContents?.executeJavaScript(code)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user