Debug: extra count

This commit is contained in:
M66B
2022-03-06 08:50:16 +01:00
parent 2f62075e10
commit e78419f6c4
7 changed files with 52 additions and 9 deletions

View File

@@ -26,8 +26,9 @@ public class NavMenuItem {
private Integer color;
private int title;
private String subtitle = null;
private int extraicon;
private int extra_icon;
private Integer count = null;
private boolean extra_count = false;
private boolean warning = false;
private boolean separated = false;
private Runnable click;
@@ -57,7 +58,7 @@ public class NavMenuItem {
}
NavMenuItem setExtraIcon(int icon) {
this.extraicon = icon;
this.extra_icon = icon;
return this;
}
@@ -67,6 +68,11 @@ public class NavMenuItem {
this.count = count;
}
NavMenuItem setExtraCount(boolean value) {
this.extra_count = value;
return this;
}
NavMenuItem setExternal(boolean external) {
setExtraIcon(external ? R.drawable.twotone_open_in_new_24 : 0);
return this;
@@ -99,13 +105,17 @@ public class NavMenuItem {
}
int getExtraIcon() {
return this.extraicon;
return this.extra_icon;
}
Integer getCount() {
return this.count;
}
boolean getExtraCount() {
return this.extra_count;
}
boolean isSeparated() {
return this.separated;
}
@@ -141,8 +151,9 @@ public class NavMenuItem {
Objects.equals(this.color, other.color) &&
this.title == other.title &&
Objects.equals(this.subtitle, other.subtitle) &&
this.extraicon == other.extraicon &&
this.extra_icon == other.extra_icon &&
Objects.equals(this.count, other.count) &&
this.extra_count == other.extra_count &&
this.warning == other.warning &&
this.separated == other.separated);
} else
@@ -151,6 +162,6 @@ public class NavMenuItem {
@Override
public int hashCode() {
return Objects.hash(icon, color, title, subtitle, extraicon, count, warning, separated);
return Objects.hash(icon, color, title, subtitle, extra_icon, count, extra_count, warning, separated);
}
}