Fix ItemGrid backdrop when alpha is active and prevent loading background twice on first load #1896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 causesonItemFocused()
to fire when the page is first loaded,Changes
m.top.alphaActive
and animate to 1px image whenever trueNote 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