-
Notifications
You must be signed in to change notification settings - Fork 98
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
Update UI Display when no item or not connected #286
Conversation
modifier: Modifier = Modifier | ||
) { | ||
val mediaItem = playerUiState.mediaItem | ||
if (!playerUiState.connected) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: given the UI layer has its own model PlayerUiState
, it could be changed to attend the specific needs of the UI classes, e.g. playerUiState.loading
instead of playerUiState.connected
; or playerUiState.mediaDisplayStatus
be either of values Loading
, Playing
or NotPlaying
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow up on this and below as I'm building on this currently.
) | ||
} else { | ||
InfoMediaDisplay( | ||
message = stringResource(R.string.horologist_nothing_playing), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I see the benefit of the library providing default content descriptions to the icons it displays (which can be overridden to provide translations) but I feel that displaying a text on the screen in a specific language by default is more invasive and would rather require this as parameter to the component - I might be biased and maybe I should not see any difference in between these two scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll follow up on this .
/** | ||
* Button to launch a screen to control the system volume. | ||
* | ||
* See [VolumeState] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: update kdoc
mediaItem, | ||
mediaItemPosition, | ||
shuffleModeEnabled, | ||
// TODO work out how to combine more than 5 flows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱
combine(
combine(f1,f2,f3,f4,f5, map),
combine(f6,f7,f8,f9,f10, map),
map
)
😅
WHAT
WHY
Avoid blank space, as per UX designs.
HOW
DefaultPlayerScreenMediaDisplay includes logic to show other status information, while DefaultMediaDisplay shows the track details only.
Checklist 📋