Encapsulate colors in UI section

This commit is contained in:
ligi 2015-03-31 18:53:06 +02:00
parent a12749d366
commit d0b4e8853c

View file

@ -39,9 +39,13 @@ public class PassWriter {
object.put("barcode", barcode);
}
final JSONObject uiObject = new JSONObject();
object.put("fgColor", "#" +String.format("%08X", pass.getForegroundColor()));
object.put("bgColor", "#" +String.format("%08X", pass.getBackGroundColor()));
object.put("ui",uiObject);
final Optional<DateTime> relevantDate = pass.getRelevantDate();
if (relevantDate.isPresent()) {