]> git.ktnx.net Git - mobile-ledger-staging.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionItemsAdapter.java
rework comments: add clear icon, italics, visible when populated, grayed-out when...
[mobile-ledger-staging.git] / app / src / main / java / net / ktnx / mobileledger / ui / activity / NewTransactionItemsAdapter.java
index 9b4022daf619340460b50cc1ba82e3d285dd1dc7..e25b9a10d01b66885af1ec0c2eb90c9631cab82c 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());
@@ -332,9 +333,6 @@ class NewTransactionItemsAdapter extends RecyclerView.Adapter<NewTransactionItem
     public void noteFocusIsOnComment(int position) {
         model.noteFocusChanged(position, NewTransactionModel.FocusedElement.Comment);
     }
-    public void toggleComment(int position) {
-        model.toggleComment(position);
-    }
     private void holdSubmittableChecks() {
         checkHoldCounter++;
     }
@@ -386,18 +384,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 {