Better naming for alert dialog exported functions

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-23 10:53:34 +02:00 committed by Tobias Kaminsky
parent 4d7472f190
commit 943dbc4a4d
2 changed files with 4 additions and 4 deletions

View file

@ -180,7 +180,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A
runOnUiThread(() -> mainViewModel.postCurrentAccount(account));
} catch (NextcloudFilesAppAccountNotFoundException e) {
// Verbose log output for https://github.com/nextcloud/notes-android/issues/1256
runOnUiThread(() -> showExceptionAlertDialog(e));
runOnUiThread(() -> showAppAccountNotFoundAlertDialog(e));
} catch (NoCurrentAccountSelectedException e) {
runOnUiThread(() -> ExceptionDialogFragment.newInstance(e).show(getSupportFragmentManager(), ExceptionDialogFragment.class.getSimpleName()));
}
@ -325,7 +325,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A
});
}
private void showExceptionAlertDialog(NextcloudFilesAppAccountNotFoundException e) {
private void showAppAccountNotFoundAlertDialog(NextcloudFilesAppAccountNotFoundException e) {
final MaterialAlertDialogBuilder alertDialogBuilder = new MaterialAlertDialogBuilder(this)
.setTitle(NextcloudFilesAppAccountNotFoundException.class.getSimpleName())
.setMessage(R.string.backup)

View file

@ -95,7 +95,7 @@ public class ManageAccountsActivity extends LockedActivity implements IManageAcc
public void onSuccess(Long unsynchronizedChangesCount) {
runOnUiThread(() -> {
if (unsynchronizedChangesCount > 0) {
showDeleteAlertDialog(accountToDelete, unsynchronizedChangesCount);
showRemoveAccountAlertDialog(accountToDelete, unsynchronizedChangesCount);
} else {
viewModel.deleteAccount(accountToDelete, ManageAccountsActivity.this);
}
@ -109,7 +109,7 @@ public class ManageAccountsActivity extends LockedActivity implements IManageAcc
});
}
private void showDeleteAlertDialog(@NonNull Account accountToDelete, Long unsynchronizedChangesCount) {
private void showRemoveAccountAlertDialog(@NonNull Account accountToDelete, Long unsynchronizedChangesCount) {
final MaterialAlertDialogBuilder alertDialogBuilder = new DeleteAlertDialogBuilder(ManageAccountsActivity.this)
.setTitle(getString(R.string.remove_account, accountToDelete.getUserName()))
.setMessage(getResources().getQuantityString(R.plurals.remove_account_message, (int) unsynchronizedChangesCount.longValue(), accountToDelete.getAccountName(), unsynchronizedChangesCount))