fixed button deactivation when sync finished

if sync finished and the files were checked the buttons were not deactivated.
Can only be reproduced on fast CPUs when using "UseWorkshop" option and already have downloaded a large set of mods
This commit is contained in:
Niklas 2020-04-01 02:29:58 +02:00
parent ccd7bfe82c
commit 21b86d6808

View File

@ -1190,7 +1190,7 @@ public class LauncherGUI implements Observer {
lastSynclist = null;
} else if (s.equals("syncStopped")) {
final Parameter workshopParameter = Parameters.USE_WORKSHOP.toParameter();
new Thread(() -> fileChecker.check(!(workshopParameter.getValue() != null && (boolean) workshopParameter.getValue()))).start();
fileCheck(!(workshopParameter.getValue() != null && (boolean) workshopParameter.getValue()));
SwingUtilities.invokeLater(() -> {
syncDownloadButton.setEnabled(false);
syncDownloadAbortButton.setEnabled(false);
@ -1202,7 +1202,7 @@ public class LauncherGUI implements Observer {
});
} else if (s.equals("syncComplete")) {
final Parameter workshopParameter = Parameters.USE_WORKSHOP.toParameter();
new Thread(() -> fileChecker.check(!(workshopParameter.getValue() != null && (boolean) workshopParameter.getValue()))).start();
fileCheck(!(workshopParameter.getValue() != null && (boolean) workshopParameter.getValue()));
SwingUtilities.invokeLater(() -> {
syncDownloadButton.setEnabled(false);
syncDownloadAbortButton.setEnabled(false);