Skip to content

Commit

Permalink
Fix regression in manual barcode selector
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed Dec 16, 2020
1 parent cf20d03 commit afa76d8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
18 changes: 18 additions & 0 deletions app/src/main/java/protect/card_locker/ScanActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit afa76d8

Please sign in to comment.