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

[Bug]: Home screen scroll state lost when clicking on podcast details #1508

Closed
4 tasks done
alexvanyo opened this issue Nov 13, 2024 · 0 comments · Fixed by #1510
Closed
4 tasks done

[Bug]: Home screen scroll state lost when clicking on podcast details #1508

alexvanyo opened this issue Nov 13, 2024 · 0 comments · Fixed by #1510
Assignees
Labels
bug Something isn't working triage me Issue that needs to be triaged

Comments

@alexvanyo
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

Is this an issue related to one of the samples?

  • Yes, this is a specific issue related to this samples repo.

Sample app

Jetcaster

What happened?

When opening a podcast details from the followed podcast list, the internal scroll state of the home screen is lost.

Screen_recording_20241112_161132.webm

This is likely due to the HomeScreen being called in two different places in the code, depending on this if statement:

if (podcastUri.isNullOrEmpty()) {
HomeScreen(
homeState = homeState,
modifier = Modifier.fillMaxSize()
)
} else {
SupportingPaneScaffold(
value = navigator.scaffoldValue,
directive = navigator.scaffoldDirective,
supportingPane = {
val podcastDetailsViewModel =
hiltViewModel<PodcastDetailsViewModel, PodcastDetailsViewModel.Factory>(
key = podcastUri
) {
it.create(podcastUri)
}
PodcastDetailsScreen(
viewModel = podcastDetailsViewModel,
navigateToPlayer = navigateToPlayer,
navigateBack = {
if (navigator.canNavigateBack()) {
navigator.navigateBack()
}
},
showBackButton = navigator.isMainPaneHidden(),
)
},
mainPane = {
HomeScreen(
homeState = homeState,
modifier = Modifier.fillMaxSize()
)
},

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage me Issue that needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants