From e1c2db03006f4d4844d98e97e0054a9361cc36a0 Mon Sep 17 00:00:00 2001 From: MrLetsplay Date: Sat, 23 Sep 2023 17:02:10 +0200 Subject: [PATCH] Fix app lock --- .../cringe_studios/cringe_authenticator/MainActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java b/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java index 52ba079..1864324 100644 --- a/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java +++ b/app/src/main/java/com/cringe_studios/cringe_authenticator/MainActivity.java @@ -48,6 +48,8 @@ public class MainActivity extends BaseActivity { private QRScanner qrScanner; + private boolean fullyLaunched; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -126,6 +128,8 @@ public class MainActivity extends BaseActivity { } private void launchApp() { + fullyLaunched = true; + binding = ActivityMainBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); @@ -306,7 +310,7 @@ public class MainActivity extends BaseActivity { @Override protected void onStart() { super.onStart(); - OTPDatabase.promptLoadDatabase(this, () -> {}, () -> {}); + if(fullyLaunched) OTPDatabase.promptLoadDatabase(this, null, null); } @Override