Last fixes.

This commit is contained in:
zaxar163 2019-01-09 16:10:17 +04:00
parent 3908351a5d
commit 96e9cabc6b
No known key found for this signature in database
GPG key ID: CEE900027AE098E0
3 changed files with 6 additions and 2 deletions

View file

@ -149,7 +149,7 @@ function goAuth(event) {
var rsaPassword = null; var rsaPassword = null;
if (!passwordField.isDisable()) { if (!passwordField.isDisable()) {
var password = passwordField.getText(); var password = passwordField.getText();
if (password !== null) { if (password !== null && !password.isEmpty()) {
rsaPassword = settings.setPassword(password); rsaPassword = settings.setPassword(password);
} else if (settings.rsaPassword !== null) { } else if (settings.rsaPassword !== null) {
rsaPassword = settings.rsaPassword; rsaPassword = settings.rsaPassword;
@ -213,6 +213,7 @@ function verifyLauncher(e) {
function doAuth(login, rsaPassword) { function doAuth(login, rsaPassword) {
processing.resetOverlay(); processing.resetOverlay();
overlay.show(processing.overlay, function (event) { overlay.show(processing.overlay, function (event) {
FunctionalBridge.getHWID.join();
makeAuthRequest(login, rsaPassword, function (result) { makeAuthRequest(login, rsaPassword, function (result) {
loginData = { pp: result.pp , accessToken: result.accessToken, permissions: result.permissions}; loginData = { pp: result.pp , accessToken: result.accessToken, permissions: result.permissions};

View file

@ -67,7 +67,8 @@ public void start(String... args) throws Throwable {
runtimeProvider.preLoad(); runtimeProvider.preLoad();
FunctionalBridge.worker = new RequestWorker(); FunctionalBridge.worker = new RequestWorker();
CommonHelper.newThread("FX Task Worker", true, FunctionalBridge.worker).start(); CommonHelper.newThread("FX Task Worker", true, FunctionalBridge.worker).start();
CommonHelper.newThread("GetHWID Thread",true, FunctionalBridge::getHWID).start(); FunctionalBridge.getHWID = CommonHelper.newThread("GetHWID Thread",true, FunctionalBridge::getHWID);
FunctionalBridge.getHWID.start();
LogHelper.debug("Dir: %s", DirBridge.dir); LogHelper.debug("Dir: %s", DirBridge.dir);
runtimeProvider.run(args); runtimeProvider.run(args);
} }

View file

@ -29,6 +29,8 @@ public class FunctionalBridge {
public static OshiHWIDProvider hwidProvider = new OshiHWIDProvider(); public static OshiHWIDProvider hwidProvider = new OshiHWIDProvider();
@LauncherAPI @LauncherAPI
public static AtomicReference<HWID> hwid = new AtomicReference<>(); public static AtomicReference<HWID> hwid = new AtomicReference<>();
@LauncherAPI
public static Thread getHWID = null;
@LauncherAPI @LauncherAPI
public static HashedDirRunnable offlineUpdateRequest(String dirName, Path dir, SignedObjectHolder<HashedDir> hdir, FileNameMatcher matcher, boolean digest) throws Exception { public static HashedDirRunnable offlineUpdateRequest(String dirName, Path dir, SignedObjectHolder<HashedDir> hdir, FileNameMatcher matcher, boolean digest) throws Exception {