Skip to content

fix(feed): prevent group name subtitle leak into other fragments (#13366) - #13974

Merged
TobiGr merged 4 commits into
TeamNewPipe:devfrom
alyshaizzati:fix/#13366-channel-group-name-leak
Oct 30, 2026
Merged

TobiGr merged 4 commits into
TeamNewPipe:devfrom
alyshaizzati:fix/#13366-channel-group-name-leak

Conversation

@alyshaizzati

Copy link
Copy Markdown
Contributor

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Overrode onResume() in FeedFragment.kt to restore/re-apply the groupName subtitle when returning to the feed tab.
  • Updated onStop() to safely clear the action bar subtitle if it matches groupName, preventing it from leaking into subsequent views when navigating away.
  • Fixes the subtitle leak into other fragments (e.g., channel pages) while ensuring the group name remains visible on its own feed tab without regression.

Before/After Screen Record

  • Before:
before.mp4
  • After:
update.mp4

Fixes the following issue(s)

Testing/QA

Devices
  • Tested on physical Android device and emulator (both Android 15 API 35) by navigating between feed groups and other app fragments.
Steps for testing
  1. Create a channel group with a name.
  2. Add the tab showing the group on the main page.
  3. Select the tab and verify the group name displays as the action bar subtitle.
  4. Navigate to search or open any channel/playlist, verifying the subtitle clears.
  5. Return to the group feed tab and verify the group name subtitle restores correctly.
APK for testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@TobiGr TobiGr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you. Please remove the equivalent part in onDestroy() as it is not needed anymore.

Comment on lines +189 to +195
/**
* Clears the action bar subtitle when leaving the fragment to prevent
* the feed group name from leaking into subsequent views (#13366).
*/
override fun onStop() {
super.onStop()
// Clear subtitle only if it currently matches group name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A general note about your code: please remove the inline comment as it is just describing what the code does and replace it with the JDoc text. The JDoc is thought to be for the whole method. And the method's purpose is not to fix this bug.

So please replace the inline comment with the text from the moethod's JDoc.

@alyshaizzati alyshaizzati Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the clear feedback.

I've removed the redundant code from onDestroy(), updated onStop(), and cleaned up the JDoc.

Ready for another look when you have a moment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you. I pushed a commit correcting the comment.

@TobiGr TobiGr self-assigned this Oct 30, 2026
@TobiGr TobiGr added GUI Issue is related to the graphical user interface feed Issue is related to the feed labels Oct 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@TobiGr
TobiGr enabled auto-merge (squash) October 30, 2026 16:15
@TobiGr
TobiGr merged commit 24b8cbe into TeamNewPipe:dev Oct 30, 2026
7 checks passed
@TobiGr TobiGr mentioned this pull request Nov 4, 2026
2 of 3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feed Issue is related to the feed GUI Issue is related to the graphical user interface size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Channel group name leaks to channel, playlist and other "views"

2 participants