Fix carousel no-peek snapping and playlist missing state#669
Fix carousel no-peek snapping and playlist missing state#669theovilardo merged 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Log.e("PlaylistVM", "Error loading playlist details for id $playlistId", e) | ||
| _uiState.update { | ||
| it.copy( | ||
| isLoading = false | ||
| isLoading = false, | ||
| playlistNotFound = false | ||
| ) |
There was a problem hiding this comment.
Failure cases leave playlist detail on infinite spinner
When loadPlaylistDetails throws, the catch block clears isLoading and explicitly resets playlistNotFound to false without providing any fallback playlist data. In the screen logic this leaves currentPlaylist null while playlistNotFound is false, so the UI falls into the currentPlaylist == null branch that shows a CircularProgressIndicator indefinitely even though loading has finished. Any API or IO error will therefore strand users on a permanent spinner instead of surfacing the missing/error state.
Useful? React with 👍 / 👎.
Removes an unnecessary import of `kotlinx.coroutines.flow.snapshotFlow` from `RoundedParallaxCarousell.kt`.
Summary
Testing
Codex Task