Merge pull request #1295 from alexbakker/intro-init-crash

Don't initialize VaultManager after the intro unless saving succeeds
This commit is contained in:
Michael Schättgen 2024-03-13 16:51:39 +01:00 committed by GitHub
commit 22c9ab7c03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,8 +55,9 @@ public class VaultManager {
throw new IllegalStateException("Vault manager is already initialized");
}
_repo = new VaultRepository(_context, new Vault(), creds);
save();
VaultRepository repo = new VaultRepository(_context, new Vault(), creds);
repo.save();
_repo = repo;
if (getVault().isEncryptionEnabled()) {
startNotificationService();