diff --git a/CHANGELOG.md b/CHANGELOG.md index b80ab09f06..784c14e332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.6.1 (2020-12-16) + +Changes: + +- Fix regression causing manual barcode entry to not be saved + ## v1.6.0 (2020-12-15) Changes: diff --git a/app/build.gradle b/app/build.gradle index 197f517c53..f055a2b3f0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { applicationId "me.hackerchick.catima" minSdkVersion 19 targetSdkVersion 29 - versionCode 52 - versionName "1.6.0" + versionCode 53 + versionName "1.6.1" vectorDrawables.useSupportLibrary = true } buildTypes { diff --git a/app/src/main/java/protect/card_locker/ScanActivity.java b/app/src/main/java/protect/card_locker/ScanActivity.java index 89b0b3441c..d1e9fd6bad 100644 --- a/app/src/main/java/protect/card_locker/ScanActivity.java +++ b/app/src/main/java/protect/card_locker/ScanActivity.java @@ -127,6 +127,24 @@ public boolean onOptionsItemSelected(MenuItem item) return super.onOptionsItemSelected(item); } + @Override + public void onActivityResult(int requestCode, int resultCode, Intent intent) + { + super.onActivityResult(requestCode, resultCode, intent); + + BarcodeValues barcodeValues = Utils.parseSetBarcodeActivityResult(requestCode, resultCode, intent); + + if (!barcodeValues.isEmpty()) { + Intent manualResult = new Intent(); + Bundle manualResultBundle = new Bundle(); + manualResultBundle.putString(BarcodeSelectorActivity.BARCODE_CONTENTS, barcodeValues.content()); + manualResultBundle.putString(BarcodeSelectorActivity.BARCODE_FORMAT, barcodeValues.format()); + manualResult.putExtras(manualResultBundle); + ScanActivity.this.setResult(RESULT_OK, manualResult); + finish(); + } + } + public void addManually(View view) { Intent i = new Intent(getApplicationContext(), BarcodeSelectorActivity.class); if (cardId != null) {