Skip to content

Commit

Permalink
codinguser#876 - * Check split not null in Listener onCheckedChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Jun 14, 2020
1 parent 3e333ec commit 03225b1
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,23 @@ public void onClick(View view) {
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {

// Change Transaction Type according to splitTypeSwitch
split.setType(splitTypeSwitch.getTransactionType());
if (split != null) {
// Split not null

// Update Split Amount Signum
updateSplitAmountEditText(split);
// Change Transaction Type according to splitTypeSwitch
split.setType(splitTypeSwitch.getTransactionType());

// Recompute Split List Balance
mImbalanceWatcher.afterTextChanged(null);
// Update Split Amount Signum
updateSplitAmountEditText(split);

// Recompute Split List Balance
mImbalanceWatcher.afterTextChanged(null);

} else {
// Split is null

// RAF
}
}
});
}
Expand Down

0 comments on commit 03225b1

Please sign in to comment.