Skip to content

feat(tv): add plugin settings button to home top bar - #3122

Open
RjBiermann wants to merge 2 commits into
recloudstream:masterfrom
RjBiermann:feat/tv-plugin-settings-gear
Open

feat(tv): add plugin settings button to home top bar#3122
RjBiermann wants to merge 2 commits into
recloudstream:masterfrom
RjBiermann:feat/tv-plugin-settings-gear

Conversation

@RjBiermann

@RjBiermann RjBiermann commented Aug 14, 2026

Copy link
Copy Markdown

Adds a plugin settings button to the TV home page top bar (the home_api_holder group with plugin dropdown, reload, quick search, random).

  • New home_preview_settings_button in fragment_home_tv.xml, placed right after the plugin dropdown button, with the same focus-chain pattern as the other icons
  • Visibility driven by the active plugin: shown only when the active provider's plugin exposes openSettings; hidden via isGone (matches sibling buttons, no dead layout slot)
  • Click resolves the active plugin from apiName via APIHolder.getApiFromNameNull and invokes openSettings
  • fragment_home.xml gets a 0dp placeholder so FragmentHomeBinding exposes 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.

@RjBiermann

Copy link
Copy Markdown
Author
image image image

@fire-light42 fire-light42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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