mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Add applicationDelegate.getAutoUpdateManagerErrorMessage()
Sometimes, the error event gets emitted before the renderer process has the chance to subscribe. Therefore, we expose an `autoUpdateManager.getErrorMessage()` in the browser process, so that we don’t lose that information.
This commit is contained in:
@@ -21,9 +21,8 @@ export default class AutoUpdateManager {
|
||||
applicationDelegate.onUpdateNotAvailable(() => {
|
||||
this.emitter.emit('update-not-available')
|
||||
}),
|
||||
applicationDelegate.onUpdateError((message) => {
|
||||
console.error(message)
|
||||
this.emitter.emit('update-error', message)
|
||||
applicationDelegate.onUpdateError(() => {
|
||||
this.emitter.emit('update-error')
|
||||
})
|
||||
)
|
||||
}
|
||||
@@ -45,6 +44,10 @@ export default class AutoUpdateManager {
|
||||
return this.applicationDelegate.getAutoUpdateManagerState()
|
||||
}
|
||||
|
||||
getErrorMessage () {
|
||||
return this.applicationDelegate.getAutoUpdateManagerErrorMessage()
|
||||
}
|
||||
|
||||
platformSupportsUpdates () {
|
||||
return atom.getReleaseChannel() !== 'dev' && this.getState() !== 'unsupported'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user