Show a backup reminder if auto backups are not enabled

If the user doesn't have auto backups enabled, the reminder will pop up
up every time a significant change is made to the vault.

Users can get rid of the reminder by:
- Creating an export
- Enabling automatic backups (either ours or Android backups will do)
This commit is contained in:
Alexander Bakker 2022-04-10 16:47:44 +02:00
parent cf9fbf081c
commit 339a31b0f3
7 changed files with 66 additions and 20 deletions

View file

@ -308,6 +308,16 @@ public class Preferences {
return _prefs.getString("pref_backups_error", null);
}
public void setIsBackupReminderNeeded(boolean needed) {
if (isBackupsReminderNeeded() != needed) {
_prefs.edit().putBoolean("pref_backups_reminder_needed", needed).apply();
}
}
public boolean isBackupsReminderNeeded() {
return _prefs.getBoolean("pref_backups_reminder_needed", false);
}
public boolean isPinKeyboardEnabled() {
return _prefs.getBoolean("pref_pin_keyboard", false);
}