mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-12-18 08:32:24 +03:00
Better naming for alert dialog exported functions
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
4d7472f190
commit
943dbc4a4d
2 changed files with 4 additions and 4 deletions
|
@ -180,7 +180,7 @@ public class MainActivity extends LockedActivity implements NoteClickListener, A
|
||||||
runOnUiThread(() -> mainViewModel.postCurrentAccount(account));
|
runOnUiThread(() -> mainViewModel.postCurrentAccount(account));
|
||||||
} catch (NextcloudFilesAppAccountNotFoundException e) {
|
} catch (NextcloudFilesAppAccountNotFoundException e) {
|
||||||
// Verbose log output for https://github.com/nextcloud/notes-android/issues/1256
|
// Verbose log output for https://github.com/nextcloud/notes-android/issues/1256
|
||||||
runOnUiThread(() -> showExceptionAlertDialog(e));
|
runOnUiThread(() -> showAppAccountNotFoundAlertDialog(e));
|
||||||
} catch (NoCurrentAccountSelectedException e) {
|
} catch (NoCurrentAccountSelectedException e) {
|
||||||
runOnUiThread(() -> ExceptionDialogFragment.newInstance(e).show(getSupportFragmentManager(), ExceptionDialogFragment.class.getSimpleName()));
|
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)
|
final MaterialAlertDialogBuilder alertDialogBuilder = new MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(NextcloudFilesAppAccountNotFoundException.class.getSimpleName())
|
.setTitle(NextcloudFilesAppAccountNotFoundException.class.getSimpleName())
|
||||||
.setMessage(R.string.backup)
|
.setMessage(R.string.backup)
|
||||||
|
|
|
@ -95,7 +95,7 @@ public class ManageAccountsActivity extends LockedActivity implements IManageAcc
|
||||||
public void onSuccess(Long unsynchronizedChangesCount) {
|
public void onSuccess(Long unsynchronizedChangesCount) {
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
if (unsynchronizedChangesCount > 0) {
|
if (unsynchronizedChangesCount > 0) {
|
||||||
showDeleteAlertDialog(accountToDelete, unsynchronizedChangesCount);
|
showRemoveAccountAlertDialog(accountToDelete, unsynchronizedChangesCount);
|
||||||
} else {
|
} else {
|
||||||
viewModel.deleteAccount(accountToDelete, ManageAccountsActivity.this);
|
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)
|
final MaterialAlertDialogBuilder alertDialogBuilder = new DeleteAlertDialogBuilder(ManageAccountsActivity.this)
|
||||||
.setTitle(getString(R.string.remove_account, accountToDelete.getUserName()))
|
.setTitle(getString(R.string.remove_account, accountToDelete.getUserName()))
|
||||||
.setMessage(getResources().getQuantityString(R.plurals.remove_account_message, (int) unsynchronizedChangesCount.longValue(), accountToDelete.getAccountName(), unsynchronizedChangesCount))
|
.setMessage(getResources().getQuantityString(R.plurals.remove_account_message, (int) unsynchronizedChangesCount.longValue(), accountToDelete.getAccountName(), unsynchronizedChangesCount))
|
||||||
|
|
Loading…
Reference in a new issue