Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes due to wrong root fragment manager #10645

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Dec 10, 2023

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

In NewPipe the MainFragment is entitled to handling the fragment backstack and the collapsible player fragment. Therefore any action involving opening new fragments (e.g. when clicking on videos/playlists/...) needs to be performed on the MainFragment's fragment manager. The previous implementation chose the fragment manager assuming that every fragment is at most singly nested (i.e. where the parent is directly MainFragment). However the new main page channel tab contains doubly-nested fragments (i.e. the channel tabs), so the previous method was choosing the wrong fragment manager, making the app crash. This PR fixes the issue by properly finding the root fragment.

Fixes the following issue(s)

APK 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

@Stypox Stypox added bug Issue is related to a bug GUI Issue is related to the graphical user interface channel Anything to do with creator channels in the app size/small PRs with less than 50 changed lines labels Dec 10, 2023
@Stypox Stypox mentioned this pull request Dec 10, 2023
21 tasks
Copy link

sonarcloud bot commented Dec 10, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@Stypox Stypox merged commit a16dcb6 into TeamNewPipe:release-0.26.0 Dec 20, 2023
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug channel Anything to do with creator channels in the app 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.

1 participant