|
@@ -15,6 +15,7 @@ public class BackButton extends Button {
|
15
|
15
|
BackButton result = new BackButton();
|
16
|
16
|
if (json == null) return result;
|
17
|
17
|
|
|
18
|
+ result.hasValue = true;
|
18
|
19
|
result.visible = BoolParser.parse(json, "visible");
|
19
|
20
|
if (json.has("icon")) result.icon = TextParser.parse(json.optJSONObject("icon"), "uri");
|
20
|
21
|
result.id = json.optString("id", Constants.BACK_BUTTON_ID);
|
|
@@ -27,11 +28,16 @@ public class BackButton extends Button {
|
27
|
28
|
return result;
|
28
|
29
|
}
|
29
|
30
|
|
30
|
|
- public BackButton() {
|
|
31
|
+ BackButton() {
|
31
|
32
|
id = Constants.BACK_BUTTON_ID;
|
32
|
33
|
}
|
33
|
34
|
|
34
|
35
|
public Bool visible = new NullBool();
|
|
36
|
+ private boolean hasValue;
|
|
37
|
+
|
|
38
|
+ public boolean hasValue() {
|
|
39
|
+ return hasValue;
|
|
40
|
+ }
|
35
|
41
|
|
36
|
42
|
public void mergeWith(BackButton other) {
|
37
|
43
|
if (other.icon.hasValue()) icon = other.icon;
|