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

[Wear] Adds queue screen #1344

Merged

Conversation

kul3r4
Copy link
Contributor

@kul3r4 kul3r4 commented Apr 15, 2024

Adds the queue screen and some refactoring

@kul3r4 kul3r4 requested a review from a team as a code owner April 15, 2024 13:05
@kul3r4 kul3r4 force-pushed the jetcaster/all_form_factors branch from e7fae32 to 54d97b9 Compare April 15, 2024 13:07
},
onEpisodeItemClick = { navController.navigateToPlayer() },
onErrorDialogCancelClick = {
navController.popBackStack()

Choose a reason for hiding this comment

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

You can combine these into a single navigation command. with a popUpTo param.

if (it.queue.isNotEmpty()) {
QueueScreenState.Loaded(it.queue)
} else {
QueueScreenState.Error

Choose a reason for hiding this comment

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

Is this actually an error? Or should just be an empty queue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to empty. I am using a similar patter to the downloads in the Media Toolkit where you actually do not navigate into the download sections until something is downloaded. So I don't expect the queue to be empty unless there is a failure loadign from the repository.

@kul3r4 kul3r4 force-pushed the jetcaster/all_form_factors branch from 54d97b9 to f2aec6e Compare April 15, 2024 20:09
import com.google.android.horologist.media.ui.screens.entity.DefaultEntityScreenHeader
import com.google.android.horologist.media.ui.screens.entity.EntityScreen

@Composable fun QueueScreen(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Composable fun QueueScreen(
@Composable
fun QueueScreen(
@kul3r4 kul3r4 force-pushed the jetcaster/all_form_factors branch from f2aec6e to b018671 Compare April 15, 2024 20:33
@kul3r4 kul3r4 merged commit 5e81ca2 into android:jetcaster/all_form_factors Apr 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants