Skip to content

fix(settings): hide icon-pack/background-plugin sections when no plugin is installed - #6

Closed
Afton-programmer wants to merge 1 commit into
HanzoDev30:mainfrom
Afton-programmer:fix/hide-empty-plugin-sections
Closed

Afton-programmer wants to merge 1 commit into
HanzoDev30:mainfrom
Afton-programmer:fix/hide-empty-plugin-sections

Conversation

@Afton-programmer

Copy link
Copy Markdown
Contributor

Follow-up to the merged #5. Its last commit (cf3f4d1) contained two parts; the expand/clipping/freeze part is already covered by your own rewrite of ExpandableLayout (the MaxHeightRecyclerView + fade/slide approach) and the new expandIfMatching() search flow on main, so this PR contains only the remaining part: the icon-pack and background-plugin sections now disappear when no matching plugin is installed.

What

Both sections built their single "Default" row unconditionally, so with zero installed plugins the settings screen showed a dead card that could never do anything. Now:

  • IconPackSettingSection.buildItems() / BackgroundPluginSettingSection.buildItems() return an empty list when listInstalled() is empty
  • the existing hideSectionIfEmpty() then removes the whole card, exactly like the other empty sections
  • bonus synergy: your new expandIfMatching() already skips cards whose visibility is not VISIBLE, so the hidden cards are excluded from search expansion automatically

No files were added/removed/moved, so map.md needs no update (AGENTS.md section 8). The change is built and verified with the repo's GitHub Actions on my fork.


ادامه‌ی #5 — بخش مربوط به expand را خودتان بازنویسی کرده بودید، پس فقط بخش باقی‌مانده اینجاست: وقتی هیچ پلاگین آیکون‌پک یا پلاگین بک‌گراند نصب نباشد، کارت مربوطه به‌طور کامل از تنظیمات مخفی می‌شود.

…plugin is installed

Both sections built their single row unconditionally, so with zero
installed plugins the settings screen showed a dead "Default" row in a
card that could never do anything. They now build zero rows when
listInstalled() is empty; the existing hideSectionIfEmpty() then removes
the whole card, exactly like the other empty sections.
@HanzoDev30

Copy link
Copy Markdown
Owner

این بخش رو خودم درست کردم و ممنون

@HanzoDev30 HanzoDev30 closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants