From 76018890b84ff635a21def75afdf060e8fca1b36 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 3 May 2020 15:55:59 +0300 Subject: [PATCH] show a message when no transactions are found containing the preferred account name --- .../ui/activity/NewTransactionItemsAdapter.java | 8 ++++++++ app/src/main/res/values-bg/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 3 files changed, 10 insertions(+) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java index dcb1ffdd..df58e539 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java @@ -29,6 +29,8 @@ import androidx.annotation.Nullable; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; +import com.google.android.material.snackbar.Snackbar; + import net.ktnx.mobileledger.BuildConfig; import net.ktnx.mobileledger.R; import net.ktnx.mobileledger.async.DescriptionSelectedCallback; @@ -245,6 +247,12 @@ class NewTransactionItemsAdapter extends RecyclerView.Adapter { + Snackbar.make(recyclerView, R.string.ignoring_preferred_account, + Snackbar.LENGTH_LONG) + .show(); + }); + MLDB.queryInBackground(broaderSql, new String[]{description}, new MLDB.CallbackHelper() { @Override diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 7a0e92ce..7b124b52 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -144,5 +144,6 @@ Валута Показване по подразбиране на полето за валута Валута по подразбиране + Липсват трансакции с предпочитаната сметка diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a2676307..1ecff70d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -157,4 +157,5 @@ Currency Commodity input visible by default Default commodity + No transactions with preferred account found -- 2.39.5