From 2db4df9d7ee357f0b167d22d77a52059235f97f2 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 17 Nov 2019 19:23:49 +0200 Subject: [PATCH] NT activity: drop method resetForm() hollow wrapper around listAdapter.reset(); --- .../mobileledger/ui/activity/NewTransactionActivity.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java index 6a6fb419..a9d74727 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java @@ -239,14 +239,15 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas getResources().getDisplayMetrics())); } public void resetTransactionFromMenu(MenuItem item) { - resetForm(); + listAdapter.reset(); } @Override public void done(String error) { progress.setVisibility(View.INVISIBLE); debug("visuals", "hiding progress"); - if (error == null) resetForm(); + if (error == null) + listAdapter.reset(); else Snackbar.make(list, error, BaseTransientBottomBar.LENGTH_LONG) .show(); @@ -254,9 +255,6 @@ public class NewTransactionActivity extends ProfileThemedActivity implements Tas viewModel.checkTransactionSubmittable(listAdapter); } - private void resetForm() { - listAdapter.reset(); - } private class AsyncCrasher extends AsyncTask { @Override protected Void doInBackground(Void... voids) { -- 2.39.5