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 ItemGrid backdrop when alpha is active and prevent loading background twice on first load #1896

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

cewert
Copy link
Member

@cewert cewert commented Aug 4, 2024

I added a bunch of debugging and since it will all be removed when prod is built I didn't see a reason to remove it 🤷‍♂️ It makes the log pretty chatty though. I used m.log.debug for everything but I'm open to suggestions on how to do the logging.

This PR resets the ItemGrid backdrop to nothing when using the alpha menu. A blank uri string didn't work with the animation so I'm using a 1px image hardcoded to our apps bgcolor. This helps see the alpha menu letters as well as preventing the weird situation of the backdrop sticking around when a new letter is selected.

Preventing the double background loading bug was a one liner and didn't deserve the effort to make another PR :) the double fire did cause the queue to contain the uri of the item focused on first load so I believe it did cause a bug where the wrong poster would load on second movement at times but it was hard to reproduce.
if itemInt = -1 or focusedRow = -1. focusedRow is -1 but causes onItemFocused() to fire when the page is first loaded,

Changes

  • add a bunch of logging
  • create 1px image same color as app bgcolor
  • observe m.top.alphaActive and animate to 1px image whenever true

Note for testing

Movies use their own view which didn't seem to need these type of changes and same for music. All other libraries use the item grid. I mostly tested with a collection and tv show library

@cewert cewert added the bug-fix This fixes a bug. label Aug 4, 2024
@cewert cewert requested a review from a team as a code owner August 4, 2024 02:27
@cewert cewert changed the title Fix ItemGrid backdrop logic when alpha is active and prevent loading background twice on first load Fix ItemGrid backdrop when alpha is active and prevent loading background twice on first load Aug 4, 2024
@jellyfin-bot
Copy link
Contributor

This pull request has been inactive for 30 days and will be automatically closed in 15 days if there is no further activity.

@jellyfin-bot jellyfin-bot added the stale This issue/PR has gone stale. label Sep 4, 2024
@jellyfin-bot
Copy link
Contributor

This pull request has been closed because it has been inactive for 45 days. You may submit a new pull request if desired.

@cewert cewert removed the stale This issue/PR has gone stale. label Sep 25, 2024
@cewert cewert reopened this Sep 25, 2024
@cewert cewert merged commit 0295a78 into jellyfin:2.1.z Sep 27, 2024
26 checks passed
@cewert cewert deleted the fix-alpha-backdrop branch September 27, 2024 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This fixes a bug.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants