From ef819242c88fa5e718b8cc26b9239945d078f77f Mon Sep 17 00:00:00 2001 From: namtacs <95915765+namtacs@users.noreply.github.com> Date: Sat, 27 Apr 2024 10:44:32 +0300 Subject: [PATCH] The offline hack --- .../java/com/kdt/mcgui/mcAccountSpinner.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/app_pojavlauncher/src/main/java/com/kdt/mcgui/mcAccountSpinner.java b/app_pojavlauncher/src/main/java/com/kdt/mcgui/mcAccountSpinner.java index 9280aa2aed..69514a9b99 100644 --- a/app_pojavlauncher/src/main/java/com/kdt/mcgui/mcAccountSpinner.java +++ b/app_pojavlauncher/src/main/java/com/kdt/mcgui/mcAccountSpinner.java @@ -130,17 +130,15 @@ public mcAccountSpinner(@NonNull Context context, @Nullable AttributeSet attrs) /* Triggered when we need to perform mojang login */ private final ExtraListener mMojangLoginListener = (key, value) -> { - if(value[1].isEmpty()){ // Test mode - MinecraftAccount account = new MinecraftAccount(); - account.username = value[0]; - try { - account.save(); - }catch (IOException e){ - Log.e("McAccountSpinner", "Failed to save the account : " + e); - } - - mDoneListener.onLoginDone(account); + MinecraftAccount account = new MinecraftAccount(); + account.username = value[0]; + try { + account.save(); + }catch (IOException e){ + Log.e("McAccountSpinner", "Failed to save the account : " + e); } + + mDoneListener.onLoginDone(account); return false; };