Skip to content

Commit

Permalink
codinguser#876 - Renamings and TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Mar 3, 2020
1 parent 6ed4930 commit b44c207
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author Ngewi Fet <[email protected]>
* @author Jesse Shieh <[email protected]>
*/
// TODO TW C 2020-03-03 : A renommer SplitType (AC)
// TODO TW m 2020-03-03 : Should be named SplitType
public enum TransactionType {
DEBIT, CREDIT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,22 +641,22 @@ public void afterTextChanged(Editable editable) {
private class SplitTransferAccountSelectedListener
implements AdapterView.OnItemSelectedListener {

private TransactionTypeSwitch mTypeToggleButton;
private TransactionTypeSwitch mTransactionTypeSwitch;
private SplitViewHolder mSplitViewHolder;

/**
* Flag to know when account spinner callback is due to user interaction or layout of components
*/
boolean userInteraction = false;

public SplitTransferAccountSelectedListener(TransactionTypeSwitch typeToggleButton,
public SplitTransferAccountSelectedListener(TransactionTypeSwitch transactionTypeSwitch,
SplitViewHolder viewHolder) {

this.mSplitViewHolder = viewHolder;

this.mTypeToggleButton = typeToggleButton;
this.mTypeToggleButton.setViewsToColorize(mSplitViewHolder.splitAmountEditText,
mSplitViewHolder.splitCurrencyTextView);
this.mTransactionTypeSwitch = transactionTypeSwitch;
this.mTransactionTypeSwitch.setViewsToColorize(mSplitViewHolder.splitAmountEditText,
mSplitViewHolder.splitCurrencyTextView);
}

/**
Expand All @@ -676,8 +676,7 @@ public void onItemSelected(AdapterView<?> parentView,

AccountType accountType = mAccountsDbAdapter.getAccountType(id);

// TODO TW C 2020-03-03 : A renommer mTransactionTypeSwitch ou mSplitTypeSwitch
mTypeToggleButton.setAccountType(accountType);
mTransactionTypeSwitch.setAccountType(accountType);

//refresh the imbalance amount if we change the account
mImbalanceWatcher.afterTextChanged(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*
* @author Ngewi Fet <[email protected]>
*/
// TODO TW C 2020-03-03 : A renommer SplitTypeSwitch (AC)
// TODO TW m 2020-03-03 : Should be named SplitTypeToggleButton (or SplitTypeSwitch) instead of TransactionTypeSwitch
public class TransactionTypeSwitch extends SwitchCompat {

private AccountType mAccountType = AccountType.EXPENSE;
Expand Down

0 comments on commit b44c207

Please sign in to comment.