Skip to content

Commit

Permalink
Fix crash in edit view
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed Jan 18, 2021
1 parent c11e995 commit 1d1109d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## Unreleased
## v1.7.1 (2021-01-18)

Changes:

- Fix crash on switching to barcode tab in edit view if there is no barcode

## v1.7.0 (2021-01-18)

Changes:

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ android {
applicationId "me.hackerchick.catima"
minSdkVersion 19
targetSdkVersion 29
versionCode 55
versionName "1.7.0"
versionCode 56
versionName "1.7.1"

vectorDrawables.useSupportLibrary true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,12 @@ private void showPart(String part) {
barcodePart.setVisibility(View.VISIBLE);

// Redraw barcode due to size change (Visibility.GONE sets it to 0)
generateBarcode(cardIdFieldView.getText().toString(), BarcodeFormat.valueOf(barcodeTypeField.getText().toString()));
String formatString = barcodeTypeField.getText().toString();
if (formatString.isEmpty() || formatString.equals(getString(R.string.noBarcode))) {
hideBarcode();
} else {
generateBarcode(cardIdFieldView.getText().toString(), BarcodeFormat.valueOf(formatString));
}
} else {
throw new UnsupportedOperationException();
}
Expand Down

0 comments on commit 1d1109d

Please sign in to comment.