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

Prevents playbutton in files episode list from changing back to pause on upnext #1627

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jmorton138
Copy link

@jmorton138 jmorton138 commented Dec 16, 2023

Description

When playing a local file, on completion, the play button would breifly get set to played, but then would change back to a pause button when the player switched to the podcast episode up next in the queue.

This issue only seemed to occur when going from a user episode to a podcast episode. If the episode up next was also a user episode, the playbutton didn't get switched back to a pause button.

The fix I've implemented works, however it doesn't solve the root of the problem which is that the playback state of the user episode gets set back to playing after it's marked as completed. My hypothesis is that whatever is updating the playback state of the upnext episode to playing is doing the same to the played local file.

I'm happy to look into this further to try and solve the issue this bug is stemming from, but I would need some guidance and direction on how player events and episode switching works as I wasn't able to quite figure it out.

Fixes #397

Testing Instructions

  1. Add a very short local file
  2. Make sure you an episode in the Up Next queue
  3. Go to Profile tab -> Files
  4. Tap on the row for the short local file
  5. Tap on the play button
  6. Let the local file complete playing in the full screen player so that the next episode is loaded from the Up Next queue
  7. Back out of the full screen player
  8. 🔴 Observe that the local file row has a played icon even
  9. Tap the local file's pause button
  10. 🔴 Observe that playback is stopped
  11. 🔴 Observe that playback has stopped, and the local file has a played button

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@jmorton138 jmorton138 requested a review from a team as a code owner December 16, 2023 15:55
@CLAassistant
Copy link

CLAassistant commented Dec 16, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files episode list play/pause icon gets stuck
2 participants