From 2857345997a66800221d36f707c6226caf74e05b Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Mon, 24 Oct 2022 05:46:22 +0200 Subject: [PATCH] only update currentState on certain types --- preload/preload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/preload/preload.js b/preload/preload.js index 2feb57e..9f0fb0d 100644 --- a/preload/preload.js +++ b/preload/preload.js @@ -145,19 +145,21 @@ window.addEventListener('DOMContentLoaded', () => { }) ipcRenderer.on('status_update', (event, status) => { - currentState = status.type; switch (status.type) { case "up-to-date": $("#launch-btn").attr('disabled', false); $('#launch-btn').html('Launch'); + currentState = status.type; break; case "update-available": $("#launch-btn").attr('disabled', false); $('#launch-btn').html('Update'); + currentState = status.type; break; case "missing-folder": $("#launch-btn").attr('disabled', true); $('#launch-btn').html('set your osu! folder'); + currentState = status.type; break; case "error": Swal.fire({