]> git.ktnx.net Git - mobile-ledger.git/commitdiff
show a message when no transactions are found containing the preferred account name
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 May 2020 12:55:59 +0000 (15:55 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 3 May 2020 12:57:45 +0000 (15:57 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java
app/src/main/res/values-bg/strings.xml
app/src/main/res/values/strings.xml

index dcb1ffdd7832a893395ddf44823c53a261f08383..df58e539a74b2c5ddb369827b3c3a55a2144d2f6 100644 (file)
@@ -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<NewTransactionItem
                 debug("descr", broaderSql);
                 debug("descr", description);
 
+                activity.runOnUiThread(() -> {
+                    Snackbar.make(recyclerView, R.string.ignoring_preferred_account,
+                            Snackbar.LENGTH_LONG)
+                            .show();
+                });
+
                 MLDB.queryInBackground(broaderSql, new String[]{description},
                         new MLDB.CallbackHelper() {
                             @Override
index 7a0e92ceb4f0b64faec6a56787bbfc39e0735e4e..7b124b52c5a5f7e2893b6185e5772a33250d5f50 100644 (file)
     <string name="show_currency_input">Валута</string>
     <string name="currency_input_by_default">Показване по подразбиране на полето за валута</string>
     <string name="profile_default_commodity">Валута по подразбиране</string>
+    <string name="ignoring_preferred_account">Липсват трансакции с предпочитаната сметка</string>
 
 </resources>
index a26763078996edf3998b9fa58d6296dfcd46c15f..1ecff70defe130c605498d7f63dfcb0cce8c787d 100644 (file)
     <string name="show_currency_input">Currency</string>
     <string name="currency_input_by_default">Commodity input visible by default</string>
     <string name="profile_default_commodity">Default commodity</string>
+    <string name="ignoring_preferred_account">No transactions with preferred account found</string>
 </resources>