Repository navigation
fix(settings): hide icon-pack/background-plugin sections when no plugin is installed - #6
Closed
Afton-programmer wants to merge 1 commit into
Closed
Afton-programmer wants to merge 1 commit into
Afton-programmer wants to merge 1 commit into
Conversation
…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.
Owner
|
این بخش رو خودم درست کردم و ممنون |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofExpandableLayout(theMaxHeightRecyclerView+ fade/slide approach) and the newexpandIfMatching()search flow onmain, 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 whenlistInstalled()is emptyhideSectionIfEmpty()then removes the whole card, exactly like the other empty sectionsexpandIfMatching()already skips cards whose visibility is notVISIBLE, so the hidden cards are excluded from search expansion automaticallyNo files were added/removed/moved, so
map.mdneeds no update (AGENTS.md section 8). The change is built and verified with the repo's GitHub Actions on my fork.ادامهی #5 — بخش مربوط به expand را خودتان بازنویسی کرده بودید، پس فقط بخش باقیمانده اینجاست: وقتی هیچ پلاگین آیکونپک یا پلاگین بکگراند نصب نباشد، کارت مربوطه بهطور کامل از تنظیمات مخفی میشود.