mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Improve backup error handling and frequency
This patch improves our backup functionality in a number of ways: - Only backup the vault when important changes are made, not when the order of entries is changed, for instance. - Don't bubble up backup errors when saving the vault. - Instead, show an error bar in the main view if the most recent backup attempt failed. <img src="https://alexbakker.me/u/kbhhj2hcgx.png" width="300" /> Clicking on the error bar will take the user to the backup settings.
This commit is contained in:
parent
ae5502b650
commit
08ab8237e7
11 changed files with 116 additions and 28 deletions
|
@ -36,7 +36,6 @@ import com.beemdevelopment.aegis.helpers.UiThreadExecutor;
|
|||
import com.beemdevelopment.aegis.ui.tasks.PasswordSlotDecryptTask;
|
||||
import com.beemdevelopment.aegis.vault.VaultFile;
|
||||
import com.beemdevelopment.aegis.vault.VaultFileCredentials;
|
||||
import com.beemdevelopment.aegis.vault.VaultManager;
|
||||
import com.beemdevelopment.aegis.vault.VaultManagerException;
|
||||
import com.beemdevelopment.aegis.vault.slots.BiometricSlot;
|
||||
import com.beemdevelopment.aegis.vault.slots.PasswordSlot;
|
||||
|
@ -273,10 +272,9 @@ public class AuthActivity extends AegisActivity {
|
|||
} else {
|
||||
try {
|
||||
AegisApplication app = getApp();
|
||||
VaultManager vault = app.initVaultManager(app.loadVaultFile(), creds);
|
||||
app.initVaultManager(app.loadVaultFile(), creds);
|
||||
if (isSlotRepaired) {
|
||||
vault.setCredentials(creds);
|
||||
saveVault();
|
||||
saveVault(true);
|
||||
}
|
||||
} catch (VaultManagerException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue