mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-06 14:07:59 -05:00
Don't force-reset loyalty card type
This commit is contained in:
@@ -9,7 +9,6 @@ Changes:
|
||||
- Several small UI fixes
|
||||
- Use letter icon for shortcuts too
|
||||
- Always show all barcode types in manual entry
|
||||
- Revert to valid barcode type if the value is not valid for the selected barcode type in edit activity
|
||||
- Remove privacy policy first start dialog
|
||||
|
||||
## v1.12 (2021-03-30)
|
||||
|
||||
@@ -99,8 +99,7 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
AlertDialog confirmExitDialog = null;
|
||||
|
||||
boolean validBalance = true;
|
||||
BarcodeFormat lastValidBarcodeType = null;
|
||||
Runnable updateOrRevertValidBarcodeType;
|
||||
Runnable warnOnInvalidBarcodeType;
|
||||
|
||||
HashMap<String, Currency> currencies = new HashMap<>();
|
||||
|
||||
@@ -160,14 +159,11 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
|
||||
|
||||
enterButton = findViewById(R.id.enterButton);
|
||||
|
||||
updateOrRevertValidBarcodeType = new Runnable() {
|
||||
warnOnInvalidBarcodeType = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if ((boolean) barcodeImage.getTag()) {
|
||||
lastValidBarcodeType = (BarcodeFormat) barcodeTypeField.getTag();
|
||||
} else {
|
||||
if (!(boolean) barcodeImage.getTag()) {
|
||||
Toast.makeText(LoyaltyCardEditActivity.this, getString(R.string.wrongValueForBarcodeType), Toast.LENGTH_LONG).show();
|
||||
barcodeTypeField.setText(lastValidBarcodeType != null ? lastValidBarcodeType.name() : getString(R.string.noBarcode));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user