From: Damyan Ivanov Date: Sat, 12 Jan 2019 14:08:31 +0000 (+0000) Subject: cleanup of the tracking of the previous transaction X-Git-Tag: v0.3~49 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=34430ca2f7f30dfd6c3bb0648dcf5466d1f0b9c7;p=mobile-ledger.git cleanup of the tracking of the previous transaction the date indicators are handled at an upper level --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java index ee1810a9..7694578e 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java @@ -17,6 +17,8 @@ package net.ktnx.mobileledger.model; +import android.support.annotation.NonNull; + import java.util.Date; public class TransactionListItem { @@ -33,6 +35,7 @@ public class TransactionListItem { this.type = Type.TRANSACTION; this.transaction = transaction; } + @NonNull public Type getType() { return type; } diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java index 0e79b7ae..e265ee4a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java @@ -48,27 +48,22 @@ public class TransactionListAdapter extends RecyclerView.Adapter 0) - previousItem = TransactionListViewModel.getTransactionListItem(position - 1); // Log.d("transactions", String.format("Filling position %d with %d accounts", position, // tr.getAccounts().size())); TransactionLoader loader = new TransactionLoader(); - loader.execute( - new TransactionLoaderParams(tr, previous, holder, position, boldAccountName)); + loader.execute(new TransactionLoaderParams(tr, holder, position, boldAccountName)); // WORKAROUND what seems to be a bug in CardHolder somewhere // when a view that was previously holding a delimiter is re-purposed @@ -121,18 +116,11 @@ public class TransactionListAdapter extends RecyclerView.Adapter