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 1 commit 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.

if (settingsState.podcastControls) {
PlayerScreenPodcastControlButtons(playerUiController, playerUiState)
} else {
playerState?.let { player ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems like it will be glitchy. blank on load then redraw.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder whether we can have some Null pattern instance of Player for loading?

Or it's better to know that the player isn't yet available, in case we are resuming and we might have some existing state we'd prefer to keep using? I don't think this is likely given a view model, but loading states in Flows that feed into a StateFlow are an antipattern because of this

@@ -83,14 +82,18 @@ fun UampWearApp(
UampTheme {
MediaPlayerScaffold(
playerScreen = {
UampMediaPlayerScreen(
NewHotnessPlayerScreen(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we add a setting to https://github.com/google/horologist/blob/bf963e6fc02d9d794dc0a6f6702db9321407af95/media/sample/src/main/proto/settings.proto

And switch between these?

That way we can land this, and have a developer setting to toggle at runtime.

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