-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/snapserver group UI #57
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
Conversation
guerman5
left a comment
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.
This PR introduces the Snapserver group UI with sticky headers, volume controls, and better client grouping, making multi-device audio smoother. The ViewModel refactor and added tests look solid. With 35 files changed, we should keep an eye on edge cases.
| NowPlayingScreenContent( | ||
| uiState = uiState, | ||
| groups = viewModel.groups, | ||
| onClientVolumeChange = viewModel::onClientVolumeChange, |
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.
SnarserverGroups call shows onClientVolumeChange twice in the diff. Once here and once in Line115. Make sure final code only passes this parameter once.
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.
it may appear as being passed twice but in reality is being hoisted by the topmost NowPlayingScreen which in turns calls the function on the viewModel, making it the final point of action
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| fun NowPlayingScreenContentPreview() { |
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.
The mock group/client construction is duplicated between Broadcaster and NowPlaying previews; you could extract a small helper to avoid repeating that structure, but that’s a minor nit.
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.
Minor NIT agree.
garpernica
left a comment
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.
Nice improvements, NowPlaying has its own ViewModel + UI state more testable and preview-friendly. Snapserver used from both Broadcaster and NowPlaying reduces duplication and keeps the Snapserver group UI consistent.
Changes
NowPlayingScreenviewModel, being in charge of audio channel selection and snapcast control interaction