Skip to content

Commit

Permalink
Improve RenderingClassesCard UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Feb 26, 2025
1 parent 9103638 commit e54ca0d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ protected void updateContent() {
container = view.findViewById(R.id.container);
container.removeAllViews();

boolean showRows = true;
if (renderingClass != null) {
container.addView(createHeaderRow(renderingClass));
showRows = settings.getBooleanRenderClassProperty(renderingClass).get();
}

if (!Algorithms.isEmpty(subclasses)) {
if (!Algorithms.isEmpty(subclasses) && showRows) {
container.addView(themedInflater.inflate(R.layout.simple_divider_item, container, false));

for (int i = 0; i < subclasses.size(); i++) {
Expand All @@ -88,7 +90,8 @@ private View createHeaderRow(@NonNull RenderingClass renderingClass) {
}

@NonNull
private View createItemRow(@NonNull RenderingClass renderingClass, boolean showSubscreen, boolean showDivider) {
private View createItemRow(@NonNull RenderingClass renderingClass, boolean showSubscreen,
boolean showDivider) {
CommonPreference<Boolean> pref = settings.getBooleanRenderClassProperty(renderingClass);
boolean enabled = pref.get();

Expand Down

0 comments on commit e54ca0d

Please sign in to comment.