From 943dbc4a4d7fa3b0a42bd17a9bebfe9116e25f38 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Tue, 23 Jul 2024 10:53:34 +0200 Subject: [PATCH] Better naming for alert dialog exported functions Signed-off-by: alperozturk --- .../java/it/niedermann/owncloud/notes/main/MainActivity.java | 4 ++-- .../owncloud/notes/manageaccounts/ManageAccountsActivity.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java index 5e2e60c0..159c41d0 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/main/MainActivity.java @@ -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) diff --git a/app/src/main/java/it/niedermann/owncloud/notes/manageaccounts/ManageAccountsActivity.java b/app/src/main/java/it/niedermann/owncloud/notes/manageaccounts/ManageAccountsActivity.java index d6c904c5..58384a8c 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/manageaccounts/ManageAccountsActivity.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/manageaccounts/ManageAccountsActivity.java @@ -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))