feat(tv): add plugin settings button to home top bar - #3122
Conversation
fire-light42
left a comment
There was a problem hiding this comment.
Great pull request!
However, it looks like you are running into a race condition when determining the visibility of homePreviewSettingsButton. Some plugins can be slow to set openSettings which leads to an inconsistent settings symbol visibility.
I recommend moving the visibility logic to page load instead. UI element pop-ins are acceptable when the whole UI pops in and it will give extensions more time to set their openSettings variable.
Plugin openSettings may be set after apiName fires, causing the button to hide on startup. Check visibility when the page pops in instead.
|
Addressed the review (race condition): moved the settings button visibility check out of the apiName observer into the page load Success branch, so it's applied when the whole UI pops in and plugins have time to set openSettings. Pushed to the branch as 1d98320. |
tested. now button shows after the homepage loads. |



Adds a plugin settings button to the TV home page top bar (the home_api_holder group with plugin dropdown, reload, quick search, random).
home_preview_settings_buttoninfragment_home_tv.xml, placed right after the plugin dropdown button, with the same focus-chain pattern as the other iconsopenSettings; hidden viaisGone(matches sibling buttons, no dead layout slot)apiNameviaAPIHolder.getApiFromNameNulland invokesopenSettingsfragment_home.xmlgets a 0dp placeholder soFragmentHomeBindingexposes the field (phone stays unaffected)TV/emulator only: the button is
isLayout(TV or EMULATOR)gated for visibility; phone layout keeps a hidden 0dp placeholder.AI usage
This PR was developed with AI assistance (opencode). AI usage included design brainstorming, implementation, and testing on TV and phone emulators. The code was built, linted, and verified on the emulators before opening this PR. I can explain every line and fix any issues found in review.