mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-27 15:30:14 +02: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();
|
||||
o.put("id", card.getId());
|
||||
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());
|
||||
if (card.getExpiry() != null)
|
||||
o.put("expiration", card.getExpiry().getTime()/1000);
|
||||
|
|
Loading…
Reference in New Issue
Block a user