mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 05:16:51 +01:00
Passing BarcodeId as value if not null
This commit is contained in:
parent
89f57243cf
commit
492119f7ee
@ -1452,7 +1452,11 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
JSONObject o = new JSONObject();
|
JSONObject o = new JSONObject();
|
||||||
o.put("id", card.getId());
|
o.put("id", card.getId());
|
||||||
o.put("name", renderUnicodeAsImage(cropToLength(card.getName(),40)));
|
o.put("name", renderUnicodeAsImage(cropToLength(card.getName(),40)));
|
||||||
o.put("value", card.getCardId());
|
if (card.getBarcodeId() != null) {
|
||||||
|
o.put("value", card.getBarcodeId());
|
||||||
|
} else {
|
||||||
|
o.put("value", card.getCardId());
|
||||||
|
}
|
||||||
o.put("type", card.getBarcodeFormat().toString());
|
o.put("type", card.getBarcodeFormat().toString());
|
||||||
if (card.getExpiry() != null)
|
if (card.getExpiry() != null)
|
||||||
o.put("expiration", card.getExpiry().getTime()/1000);
|
o.put("expiration", card.getExpiry().getTime()/1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user