Skip to content

autoScrollToBestProgramme/focusCurrentProgram don't always focus correctly on the corrent program #64

@jleahy2

Description

@jleahy2

I have noticed that autoScrollToBestProgramme doesn't always seem to focus on the correct item for some reason. There are 2 things going on in there: jumpTo() and focusCurrentProgram().

I've tried to dig into this a bit, and jumpTo() seems to always work correctly. No matter where I am, It always scrolls the view to the correct area with the current program. However, focusCurrentProgram() does not seem to be working correctly for some reason.

Sometimes it does focus on the current program for the selected channel as it should, however it often it doesn't, highlighting something in front of it.

I've noticed that it seems to work much better if you are viewing older program data behind the current time. Every time I've tried this, autoScrollToBestProgramme() will scroll forward and correctly focus on the current program. The problem seems to be when you're looking at programs in the future that are beyond the current time.

A lot of the time when I try to run autoScrollToBestProgramme() when I've moved into the future, jumpTo() gets called and it scrolls the grid back properly, however focusCurrentProgram() often fails to correctly bring focus to the actual correct current program for that channel.

I've noticed in the log that it will say "Scrolling to PROGRAMNAME, started at 1709931600000", so it's definitely finding the correct program, but the focus sometimes either doesn't change at all, or it moves to the wrong program that is not currently playing.

The issue seems most likely to show up when you are trying to autoScrollToBestProgramme for a specific channel that you're already on. Say if you're on index 5 of the channels, and you scroll to the right past the current time and then try to autoScrollToBestProgramme back to the same channel you're on, it has a high probability of happening, but sometimes (although seldomly) it does get it right.

I've tried unsuccessfully to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions