Skip to content

Partial revert: fix VideoDetailFragment flickering#13132

Merged
Stypox merged 1 commit intoTeamNewPipe:devfrom
Stypox:regression-detailfragment-flickers
Jan 28, 2026
Merged

Partial revert: fix VideoDetailFragment flickering#13132
Stypox merged 1 commit intoTeamNewPipe:devfrom
Stypox:regression-detailfragment-flickers

Conversation

@Stypox
Copy link
Member

@Stypox Stypox commented Jan 27, 2026

What is it?

  • Bugfix (user facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This partially reverts commit 92a07a3 in #12606, which was needed to fix ghost notifications (#12489). There I broke the "cycle" causing the useless notifications to popup in 2 different places (see points 3 and 4 of the commit description). However, breaking the cycle in point 4 ("PlayerHolder::tryBindIfNeeded() is now used to passively try to bind, instead of PlayerHolder::startService()") was not correct, for the following reason. I assumed that ACTION_PLAYER_STARTED was used for notifying that the player was instantiated anew, while it actually is used to notify that something is now ready for use: it could be the player, but it could also just be that the bottom sheet view was just added and thus the VideoDetailFragment needs to start the player. Therefore, when handling ACTION_PLAYER_STARTED it is correct to start the player service and not just try to bind to it. The other point in which I broke the cycle (point 3) should still prevent ghost notifications, although I could not test.

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

This partially reverts commit 92a07a3, which was needed to fix ghost notifications. There I broke the "cycle" causing the useless notifications to popup in 2 different places (see points 3 and 4 of the commit description).
However, breaking the cycle in point 4 ("`PlayerHolder::tryBindIfNeeded()` is now used to passively try to bind, instead of `PlayerHolder::startService()`" was not correct, for the following reason.
I assumed that `ACTION_PLAYER_STARTED` was used for notifying that the player was instantiated anew, while it actually is used to notify that something is now ready for use: it could be the player, but it could also just be that the bottom sheet view was just added and thus the VideoDetailFragment needs to start the player.
Therefore, when handling `ACTION_PLAYER_STARTED` it is correct to start the player service and not just try to bind to it.
The other point in which I broke the cycle (point 3) should still prevent ghost notifications, although I could not test.
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Jan 27, 2026
@Stypox Stypox added this to v0.28.x Jan 27, 2026
@github-project-automation github-project-automation bot moved this to Todo in v0.28.x Jan 27, 2026
@Stypox Stypox moved this from Todo to In Progress in v0.28.x Jan 27, 2026
@Stypox Stypox merged commit c0613b5 into TeamNewPipe:dev Jan 28, 2026
7 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in v0.28.x Jan 28, 2026
@ShareASmile ShareASmile added bug Issue is related to a bug player Issues related to any player (main, popup and background) labels Jan 29, 2026
dustdfg added a commit to dustdfg/NewPipe that referenced this pull request Feb 16, 2026
absurdlylongusername added a commit that referenced this pull request Feb 19, 2026
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 player Issues related to any player (main, popup and background) size/small PRs with less than 50 changed lines

Projects

Status: Done

2 participants