-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Only show "Enqueue next" when in the middle of the queue #8883
Conversation
Kudos, SonarCloud Quality Gate passed! |
Well it will degrade newpipe experience for some users as when you have a long queue and you want to play something after current video is played ensue next is used else for making a long queue you should use 'enqueue' button |
I'm confused how this will degrade experience, it will only hide the enqueue next button when it has the same effect as the enqueue button: when you are in watching the last video in the queue |
This comment was marked as off-topic.
This comment was marked as off-topic.
This patch only hides the enqueue next button when you are currently playing video E, therefore whichever button you press there is only 1 place for F to go: the sixth position. |
final int size = holder.getQueueSize(); | ||
if (size > 1 && holder.getQueuePosition() < size - 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need the size > 1
condition. If size <= 1
, then size - 1 <= 0
, and since queuePosition
is always >= 0
, it is never < size - 1 <= 0
.
final int size = holder.getQueueSize(); | |
if (size > 1 && holder.getQueuePosition() < size - 1) { | |
if (holder.getQueuePosition() < holder.getQueueSize() - 1) { |
Add a check that the queue position is not the last in the queue before showing "Enqueue next". Previously the "Enqueue next" action would always be shown if the queue length was greater than one, this meant even if you were at the end of the queue (when "Enqueue" would have the same effect as "Enqueue next") the action would still be shown.
a824f11
to
e5f30a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I tested and it works well
Kudos, SonarCloud Quality Gate passed! |
What is it?
Description of the changes in your PR
Add a check that the queue position is not the last in the queue before
showing "Enqueue next".
Previously the "Enqueue next" action would always be shown if the queue
length was greater than one, this meant even if you were at the end of
the queue (when "Enqueue" would have the same effect as "Enqueue next")
the action would still be shown.
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.
Due diligence