Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

fixes #12: It will be better to restrict user to add either "user ID" or "name", without leaving both details empty #23

Merged
merged 2 commits into from
Jun 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,23 @@ public void onClick(View v) {
insert.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
id = id + uid1ET.getText().toString();
id = uid1ET.getText().toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the change here as by adding id to we will know the type whether it is Donation or Registration then check if the length equals to 3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mustaqmustu I did not notice that change. Please revert that in another pr ASAP.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the PR please make another PR

name = nameET.getText().toString();
if (flag == 1) {
poojaTyp = String.valueOf(poojaType.getSelectedItem());

overall = poojaTyp + getResources().getString(R.string.empty) + name + getResources().getString(R.string.empty) + paidCheck;
} else {
money = moneyDonated.getText().toString();
overall = money + getResources().getString(R.string.empty) + name + getResources().getString(R.string.empty) + paidCheck;
if (id.length() == 0) {
Toast.makeText(getBaseContext(), "Please enter a valid user ID", Toast.LENGTH_LONG).show();
}
else {
if (flag == 1) {
poojaTyp = String.valueOf(poojaType.getSelectedItem());

overall = poojaTyp + getResources().getString(R.string.empty) + name + getResources().getString(R.string.empty) + paidCheck;
new InsertDataActivity().execute();
} else {
money = moneyDonated.getText().toString();
overall = money + getResources().getString(R.string.empty) + name + getResources().getString(R.string.empty) + paidCheck;
new InsertDataActivity().execute();
}
}

new InsertDataActivity().execute();
}
});
}
Expand Down