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

Demonstrate an alternative architectural approach #2431

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

Conversation

JolandaVerhoef
Copy link

Approach is hard-linked with the Media3 Player interface.

WHAT

WHY

HOW

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@yschimke
Copy link
Collaborator

This looks promising.

If you go to https://github.com/JolandaVerhoef/horologist/actions/workflows/fixup.yml, and run against your branch, it should fix API, screenshots and some lint.

@yschimke
Copy link
Collaborator

@JolandaVerhoef nice, this is looking promising.

) {
val player: Player? by newHotnessPlayerScreenViewModel.player.collectAsStateWithLifecycle()
val player by experimentalUiModePlayerScreenViewModel.player.collectAsStateWithLifecycle()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like we should use the null pattern* to handle this outside the screen. And rely on the ViewModel to cache the current player on resuming the player activity.

So it's never null, you can always show something, but no media will be shown, no actions enabled, and the screen can check and use that as a loading state if it wants.

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.

2 participants