]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java
NT: explicitly set the comment when loading a previous transaction
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / NewTransactionItemsAdapter.java
index 9b4022daf619340460b50cc1ba82e3d285dd1dc7..d20f402f806aafefa9906ec0f61044c1196b76c2 100644 (file)
@@ -263,6 +263,7 @@ class NewTransactionItemsAdapter extends RecyclerView.Adapter<NewTransactionItem
 
             item.getAccount()
                 .setAccountName(acc.getAccountName());
+            item.setComment(acc.getComment());
             if (acc.isAmountSet()) {
                 item.getAccount()
                     .setAmount(acc.getAmount());
@@ -386,18 +387,12 @@ class NewTransactionItemsAdapter extends RecyclerView.Adapter<NewTransactionItem
         final String descriptionText = model.getDescription();
         boolean submittable = true;
         final ItemsForCurrency itemsForCurrency = new ItemsForCurrency();
-        final ItemsForCurrency itemsWithEmptyAmountForCurrency =
-                new ItemsForCurrency();
-        final ItemsForCurrency itemsWithAccountAndEmptyAmountForCurrency =
-                new ItemsForCurrency();
-        final ItemsForCurrency itemsWithEmptyAccountForCurrency =
-                new ItemsForCurrency();
-        final ItemsForCurrency itemsWithAmountForCurrency =
-                new ItemsForCurrency();
-        final ItemsForCurrency itemsWithAccountForCurrency =
-                new ItemsForCurrency();
-        final ItemsForCurrency emptyRowsForCurrency =
-                new ItemsForCurrency();
+        final ItemsForCurrency itemsWithEmptyAmountForCurrency = new ItemsForCurrency();
+        final ItemsForCurrency itemsWithAccountAndEmptyAmountForCurrency = new ItemsForCurrency();
+        final ItemsForCurrency itemsWithEmptyAccountForCurrency = new ItemsForCurrency();
+        final ItemsForCurrency itemsWithAmountForCurrency = new ItemsForCurrency();
+        final ItemsForCurrency itemsWithAccountForCurrency = new ItemsForCurrency();
+        final ItemsForCurrency emptyRowsForCurrency = new ItemsForCurrency();
         final List<NewTransactionModel.Item> emptyRows = new ArrayList<>();
 
         try {