Skip to content

Commit

Permalink
Merge branch 'pr/700' into hotfix/patches
Browse files Browse the repository at this point in the history
  • Loading branch information
rivaldi8 committed Jul 4, 2017
2 parents 85c13a1 + a29d556 commit c18b040
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class TransactionDetailActivity extends PasscodeLockActivity {

private String mTransactionUID;
private String mAccountUID;
private int mDetailTableRows;

public static final int REQUEST_EDIT_TRANSACTION = 0x10;

Expand Down Expand Up @@ -126,6 +127,7 @@ private void bindViews(){
TextView balanceTextView = accountBalance.isNegative() ? mDebitBalance : mCreditBalance;
TransactionsActivity.displayBalance(balanceTextView, accountBalance);

mDetailTableRows = mDetailTableLayout.getChildCount();
boolean useDoubleEntry = GnuCashApplication.isDoubleEntryEnabled();
LayoutInflater inflater = LayoutInflater.from(this);
int index = 0;
Expand Down Expand Up @@ -175,8 +177,8 @@ private void refresh(){
* Remove the split item views from the transaction detail prior to refreshing them
*/
private void removeSplitItemViews(){
long splitCount = TransactionsDbAdapter.getInstance().getSplitCount(mTransactionUID);
mDetailTableLayout.removeViews(0, (int)splitCount);
// Remove all rows that are not special.
mDetailTableLayout.removeViews(0, mDetailTableLayout.getChildCount() - mDetailTableRows);
mDebitBalance.setText("");
mCreditBalance.setText("");
}
Expand Down

0 comments on commit c18b040

Please sign in to comment.