Skip to content

Provide MiniPlayerState to save/restore isPlaying state for MiniPlayer View - #527

Merged
ashiagr merged 2 commits into
Automattic:mainfrom
mrmike:handle-mini-player-view-state
Nov 30, 2022
Merged

ashiagr merged 2 commits into
Automattic:mainfrom
mrmike:handle-mini-player-view-state

Conversation

@mrmike

@mrmike mrmike commented Nov 1, 2022 •

Copy link
Copy Markdown
Contributor

Description

Provide MiniPlayerState to restore playing value after MiniPlayer view is recreated. Currently MiniPlayer view after recreation always starts with the state playing=state even if podcast is playing. This may lead to different glitches with animating play/pause state (like that one described in #523). I was considering using BaseSavedState instead of plain Parcelable but I think in this case it's fine since MiniPlayer won't be extended by other classes.

Fixes #523

Testing Instructions

  1. Start playing a podcast
  2. Switch themes in the app
  3. Play button should not switch back and forth a few times between play and pause

Screenshots or Screencast

fix.mp4

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • 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

@mrmike
mrmike requested a review from a team as a code owner November 1, 2022 20:05
@CLAassistant

CLAassistant commented Nov 1, 2022 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ashiagr ashiagr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing that annoying animation! 🙏

@ashiagr ashiagr added this to the 7.28 milestone Nov 30, 2022
@ashiagr
ashiagr merged commit 953d840 into Automattic:main Nov 30, 2022
@mrmike
mrmike deleted the handle-mini-player-view-state branch November 30, 2022 11:23
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.

When changing themes while playing the miniplayer play icon switches back and forth

3 participants