diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 20:23:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 20:23:20 +0100 |
commit | 98fa01696b123b8d602b20534f866debdb64df52 (patch) | |
tree | 9e4d4ac04b01010b4c2faa71543440114308be86 /src/app/js/update.js | |
parent | fab59ba8b8b1c567ee158b9681c5b373fb7303e4 (diff) | |
parent | 00d04db553eb53abb48f0b4e3649a6912fdc10df (diff) | |
download | Viper-98fa01696b123b8d602b20534f866debdb64df52.tar.gz Viper-98fa01696b123b8d602b20534f866debdb64df52.zip |
Merge pull request #246 from Jan200101/PR/onLine-event
feat: handle no internet better
Diffstat (limited to 'src/app/js/update.js')
-rw-r--r-- | src/app/js/update.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app/js/update.js b/src/app/js/update.js index d03db02..3732f89 100644 --- a/src/app/js/update.js +++ b/src/app/js/update.js @@ -125,7 +125,15 @@ let update = { // updates Northstar, `force_update` forcefully updates Northstar, // causing it to update, even if its already up-to-date - ns: (force_update) => { + ns: async (force_update) => { + let can_connect = await request.check_with_toasts( + "GitHub", "https://github.com" + ) + + if (! can_connect) { + return; + } + update.ns.last_checked = new Date().getTime(); ipcRenderer.send("update-northstar", force_update); update.ns.should_install = false; |