mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-05-18 05:36:39 -04:00
Fix crash on pkpass with no barcodes
This commit is contained in:
@@ -34,7 +34,10 @@ class PkpassParser(context: Context, uri: Uri?) {
|
||||
private var expiry: Date? = null
|
||||
private val balance: BigDecimal = BigDecimal(0)
|
||||
private val balanceType: Currency? = null
|
||||
private var cardId: String? = null
|
||||
// FIXME: Some cards may not have any barcodes, but Catima doesn't accept null card ID
|
||||
// An empty string card ID would prevent a crash, but would be blocked in the edit activity
|
||||
// Setting the default to the "No barcode" text at least prevents a crash, but it is definitely a hack
|
||||
private var cardId: String = context.getString(R.string.noBarcode)
|
||||
private var barcodeId: String? = null
|
||||
private var barcodeType: CatimaBarcode? = null
|
||||
private var headerColor: Int? = null
|
||||
|
||||
Reference in New Issue
Block a user