mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-22 07:22:26 +00:00
Add some comments
This commit is contained in:
parent
ae4a8724e8
commit
8040753119
1 changed files with 5 additions and 1 deletions
|
@ -256,14 +256,18 @@ public class SendFragment extends Fragment {
|
||||||
int currentOutputs = getDestCount();
|
int currentOutputs = getDestCount();
|
||||||
UriData uriData = UriData.parse(editable.toString());
|
UriData uriData = UriData.parse(editable.toString());
|
||||||
if(uriData != null) {
|
if(uriData != null) {
|
||||||
|
// we have valid address
|
||||||
boolean hasPaymentId = uriData.hasPaymentId();
|
boolean hasPaymentId = uriData.hasPaymentId();
|
||||||
if(currentOutputs > 1 && hasPaymentId) {
|
if(currentOutputs > 1 && hasPaymentId) {
|
||||||
|
// multiple outputs when pasting/editing in integrated address. this is not allowed
|
||||||
Toast.makeText(getActivity(), getString(R.string.paymentid_paytomany), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), getString(R.string.paymentid_paytomany), Toast.LENGTH_SHORT).show();
|
||||||
addressField.setText(null);
|
addressField.setText(null);
|
||||||
} else if(currentOutputs == 1 && hasPaymentId) {
|
} else if(currentOutputs == 1 && hasPaymentId) {
|
||||||
|
// show add output button: we are sending to integrated address
|
||||||
mViewModel.setShowAddOutputButton(false);
|
mViewModel.setShowAddOutputButton(false);
|
||||||
}
|
}
|
||||||
} else if(currentOutputs == 1 && !isSendAll()){
|
} else if(currentOutputs == 1 && !isSendAll()) {
|
||||||
|
// when send-all is false and this is our only dest and address is invalid, then show add output button
|
||||||
mViewModel.setShowAddOutputButton(true);
|
mViewModel.setShowAddOutputButton(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue