Newpipe: [Unified Player] Back button takes user to the previous video they were watching even if it wasn't where they clicked onto the current video from

Created on 11 Sep 2020  ·  12Comments  ·  Source: TeamNewPipe/NewPipe

Version

  • Unified Player 2020-09-08
  • Android 10

Steps to reproduce the bug

  1. Select a video from the trending tab, search results or a channel page and wait for it to play.
  2. Use the back button to go back to the trending page
  3. Select another video
  4. Use the back button again

Expected behavior


The back button takes me back to the trending page

Actual behaviour


The back button instead takes me to the video I clicked on previously.
I'm not sure if this is actually a bug or expected behavior but I think its more intuitive for the back button to take the user to where they were previously instead of the last video they were watching.

Screenshots/Screen recordings

Logs

bug

Most helpful comment

@opusforlife2 that'd result in the same exact unexpected behaviour: pressing back in the second situation does not bring you back to the previous page. And also having two different behavioues based on some hidden state is not a good idea imo. I'd keep it as it is now: when you press back you go to the previous video, and when you drag down you go to the previous (trending) page.

All 12 comments

Hmmm. So I'm guessing your preferred behaviour would be that the back button instead minimizes the video, while preserving the backstack? That makes sense to me.

I think this was already discussed in # 2907, and is intended behaviour. See some of avently's comments on this: https://github.com/TeamNewPipe/NewPipe/pull/2907#issuecomment-573734453 https://github.com/TeamNewPipe/NewPipe/pull/2907#issuecomment-592999951 and in particular the answer to my same concern https://github.com/TeamNewPipe/NewPipe/pull/2907#issuecomment-662156694

So I think we settled on this behaviour, which makes sense and is useful to help not losing the whole backstack every time, and this will most probably stay this way.

and is useful to help not losing the whole backstack every time

The backstack isn't lost on minimizing, though? Quoting from one of avently's comments you linked:

Minimizing actually shouldn't do anything with backstack. When you minimize a video it looks like a mini player, backstack (== history of played videos) is untouched, that's it, no hidden logic behind.

Intended behavior. You are asking about removing history. It's the thing that took me the most of the time to make it working like this.
So, yeah, I like it and will not change. If any developer wants to implement a setting that can be used to enable/disable history, let him do it. It's a couple of lines of code. Actually one line + lines for the setting:)
But I will not be that guy.

Intended behavior. You are asking about removing history

How?

So I'm guessing your preferred behaviour would be that the back button instead minimizes the video, while preserving the backstack?

@opusforlife2

So I'm guessing your preferred behaviour would be

It's only you guessing, he said nothing about preserving a history

I'm not sure if this is actually a bug or expected behavior but I think its more intuitive for the back button to take the user to where they were previously instead of the last video they were watching.

The user never said anything about _removing_ history either, so I'm not sure why you should assume that must be the case.

And anyway, _even if_ the issue poster naively assumes backstack history has to be removed to fix the bug, if we know that isn't the case, we can just implement the smarter fix which preserves the backstack anyway.

@opusforlife2 he marked the issue as a bug, so yeah, it means that he thinks that this functionality is a mistake.
I disagree with it and I said why.
Do you want to disable history too?

Do you want to disable history too?

(╯°□°)╯︵ ┻━┻

Okay, no more speculating on what the issue poster wants. That way lies madness.

I'm going to talk only about my thoughts on what the navigation could be like if a fix were to be implemented. Note: nowhere does it involve removing history. I _love_ history. History is _important_. It _must_ be _preserved_. End of story.

From the steps to reproduce in the OP:

  1. Select a video from the trending tab, search results or a channel page and wait for it to play.
  2. Use the back button to go back to the trending page <- (this minimizes the video)
  3. Select another video
  4. Use the back button again
  5. You're taken to the previous video in the backstack. <- (this is unexpected, because when you tap the back button you expect to go back to where you came from, not a new page)

A possible way to navigate that fixes the problem:

  1. Select a video from the trending tab, search results or a channel page and wait for it to play.
  2. Use the back button to go back to the trending page <- (this minimizes the video)
  3. Select another video
  4. Use the back button again <- (this should also minimize the video just like step 2 does, so that no history is lost)
  5. You're taken back to the trending page.
  6. Swipe up on the minimized video.
  7. Tap the back button.
  8. The previous video in the backstack opens. Now you can navigate the backstack using the back button.

@opusforlife2 that'd result in the same exact unexpected behaviour: pressing back in the second situation does not bring you back to the previous page. And also having two different behavioues based on some hidden state is not a good idea imo. I'd keep it as it is now: when you press back you go to the previous video, and when you drag down you go to the previous (trending) page.

@Stypox absolutely agree!

That makes sense. Closing this, then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mouarfff picture mouarfff  ·  3Comments

desmonk picture desmonk  ·  3Comments

hassanseoul123 picture hassanseoul123  ·  3Comments

PanderMusubi picture PanderMusubi  ·  3Comments

cool-student picture cool-student  ·  3Comments