mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-17 07:22:50 +00:00
Store and display backup error messages more clearly
This commit is contained in:
parent
4427498d5e
commit
8ae8130b71
10 changed files with 242 additions and 34 deletions
|
@ -41,7 +41,6 @@ import com.beemdevelopment.aegis.helpers.FabScrollHelper;
|
|||
import com.beemdevelopment.aegis.helpers.PermissionHelper;
|
||||
import com.beemdevelopment.aegis.otp.GoogleAuthInfo;
|
||||
import com.beemdevelopment.aegis.otp.GoogleAuthInfoException;
|
||||
import com.beemdevelopment.aegis.otp.OtpInfo;
|
||||
import com.beemdevelopment.aegis.otp.OtpInfoException;
|
||||
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
||||
import com.beemdevelopment.aegis.ui.fragments.preferences.BackupsPreferencesFragment;
|
||||
|
@ -781,15 +780,13 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
}
|
||||
|
||||
private void updateErrorBar() {
|
||||
String backupError = null;
|
||||
if (_prefs.isBackupsEnabled()) {
|
||||
backupError = _prefs.getBackupsError();
|
||||
}
|
||||
|
||||
if (backupError != null) {
|
||||
Preferences.BackupResult backupRes = _prefs.getErroredBackupResult();
|
||||
if (backupRes != null) {
|
||||
_textErrorBar.setText(R.string.backup_error_bar_message);
|
||||
_btnErrorBar.setOnClickListener(view -> {
|
||||
startPreferencesActivity(BackupsPreferencesFragment.class, "pref_backups");
|
||||
Dialogs.showBackupErrorDialog(this, backupRes, (dialog, which) -> {
|
||||
startPreferencesActivity(BackupsPreferencesFragment.class, "pref_backups");
|
||||
});
|
||||
});
|
||||
_btnErrorBar.setVisibility(View.VISIBLE);
|
||||
} else if (_prefs.isBackupsReminderNeeded()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue