diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 19:42:15 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-12-20 19:42:15 +0100 |
commit | 01da499a2cc510536aa7cfa38ffa96ba50adb540 (patch) | |
tree | 0598035358241c85a61cf71917ed8a4911891811 | |
parent | 97f8e8d9ad4d680a6f28946fa236a0a809f839e0 (diff) | |
download | Viper-01da499a2cc510536aa7cfa38ffa96ba50adb540.tar.gz Viper-01da499a2cc510536aa7cfa38ffa96ba50adb540.zip |
refresh server status when back online
-rw-r--r-- | src/app/js/request.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app/js/request.js b/src/app/js/request.js index 3639dad..ad8c25b 100644 --- a/src/app/js/request.js +++ b/src/app/js/request.js @@ -1,3 +1,4 @@ +const launcher = require("./launcher"); const set_buttons = require("./set_buttons"); const ipcRenderer = require("electron").ipcRenderer; @@ -22,7 +23,7 @@ request.delete_cache = () => { let sent_error_toast = false; // shows or hides offline icon, and shows toast depending on `is_online` -let state_action = (is_online) => { +let state_action = async (is_online) => { if (is_online) { // hide offline icon sent_error_toast = false; @@ -34,6 +35,7 @@ let state_action = (is_online) => { document.querySelectorAll(".requires-internet") ) + await launcher.check_servers(); serverstatus.style.opacity = "1.0"; } else { // show toast |