Fix app lock

This commit is contained in:
MrLetsplay 2023-09-23 17:02:10 +02:00
parent 81e8870507
commit e1c2db0300
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -48,6 +48,8 @@ public class MainActivity extends BaseActivity {
private QRScanner qrScanner; private QRScanner qrScanner;
private boolean fullyLaunched;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -126,6 +128,8 @@ public class MainActivity extends BaseActivity {
} }
private void launchApp() { private void launchApp() {
fullyLaunched = true;
binding = ActivityMainBinding.inflate(getLayoutInflater()); binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot()); setContentView(binding.getRoot());
@ -306,7 +310,7 @@ public class MainActivity extends BaseActivity {
@Override @Override
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
OTPDatabase.promptLoadDatabase(this, () -> {}, () -> {}); if(fullyLaunched) OTPDatabase.promptLoadDatabase(this, null, null);
} }
@Override @Override