File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,14 @@ export function onAutoupdateStarted({ newVersion }: { newVersion: string }) {
105105 title : `Compass ${ newVersion } is downloading` ,
106106 } ) ;
107107}
108- export function onAutoupdateFailed ( ) {
108+ export function onAutoupdateFailed ( reason ?: 'outdated-operating-system' ) {
109109 openToast ( updateToastId , {
110110 variant : 'warning' ,
111111 title : 'Failed to download Compass update' ,
112- description : 'Downloading a newer Compass version failed' ,
112+ description :
113+ reason === 'outdated-operating-system'
114+ ? 'The version of your operating system is no longer supported.'
115+ : 'Downloading a newer Compass version failed' ,
113116 } ) ;
114117}
115118export function onAutoupdateSuccess ( {
Original file line number Diff line number Diff line change @@ -371,7 +371,12 @@ const app = {
371371 onAutoupdateStarted ( { newVersion } ) ;
372372 }
373373 ) ;
374- ipcRenderer ?. on ( 'autoupdate:update-download-failed' , onAutoupdateFailed ) ;
374+ ipcRenderer ?. on (
375+ 'autoupdate:update-download-failed' ,
376+ ( _ , reason ?: 'outdated-operating-system' ) => {
377+ onAutoupdateFailed ( reason ) ;
378+ }
379+ ) ;
375380 ipcRenderer ?. on (
376381 'autoupdate:update-download-success' ,
377382 ( _ , { newVersion } : { newVersion : string } ) => {
Original file line number Diff line number Diff line change @@ -485,7 +485,10 @@ const STATE_UPDATE: Record<
485485 [ AutoUpdateManagerState . OutdatedOperatingSystem ] : {
486486 nextStates : [ AutoUpdateManagerState . UserPromptedManualCheck ] ,
487487 enter : ( ) => {
488- ipcMain ?. broadcast ( 'autoupdate:outdated-operating-system' ) ;
488+ ipcMain ?. broadcast (
489+ 'autoupdate:update-download-failed' ,
490+ 'outdated-operating-system'
491+ ) ;
489492 log . info (
490493 mongoLogId ( 1_001_000_346 ) ,
491494 'AutoUpdateManager' ,
You can’t perform that action at this time.
0 commit comments