google / horologist

Horologist is a group of libraries that aim to supplement Wear OS developers with features that are commonly required by developers but not yet available.
https://google.github.io/horologist/
Apache License 2.0
544 stars 87 forks source link

Player UI state #2177

Closed laiyichin closed 2 months ago

laiyichin commented 3 months ago

WHAT

Add an optional field to denote if the title should show with placeholder.

WHY

In addition to the player state, give the client an option to show the placeholder pill in place of title when title is not known yet.

HOW

Checklist :clipboard:

laiyichin commented 3 months ago

Why is this not just based on whether media model and title is set?

Adding this state allows to accommodate use cases when media apps do not provide metadata (e.g. a player playing in incognito mode in chrome), there could be a fallback string for title instead of a loading pill.

laiyichin commented 2 months ago

Abandoning this PR in favour of making MediaUiModel a sealed class with a Loading object. https://github.com/google/horologist/pull/2179