Skip to content

Add playlist view toggle to library folders#289

Merged
theovilardo merged 3 commits intomasterfrom
codex/add-playlist-view-toggle-to-folders-tab
Oct 23, 2025
Merged

Add playlist view toggle to library folders#289
theovilardo merged 3 commits intomasterfrom
codex/add-playlist-view-toggle-to-folders-tab

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

Summary

  • add a persisted playlist-view toggle to the folders sort sheet
  • render flattened folders as playlist-style cards with album art previews when enabled
  • update the player view model to reset folder navigation based on the new preference

Testing

  • ./gradlew :app:compileDebugKotlin (fails: SDK location not found in container)

https://chatgpt.com/codex/tasks/task_e_68fa3921f150832f8971dc4cc00c765a

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +593 to +596
viewModelScope.launch {
userPreferencesRepository.isFoldersPlaylistViewFlow.collect { isPlaylistView ->
setFoldersPlaylistViewState(isPlaylistView)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reset folders view on unrelated preference updates

The new collector for userPreferencesRepository.isFoldersPlaylistViewFlow triggers setFoldersPlaylistViewState on every DataStore emission. Because the flow maps directly from dataStore.data without distinctUntilChanged, it re-emits the same boolean whenever any preference (sorting, theme, etc.) is written. setFoldersPlaylistViewState always clears currentFolder and currentFolderPath, so browsing the folder hierarchy will unexpectedly jump back to the root whenever an unrelated preference is saved even though the playlist-view toggle itself didn’t change. Consider ignoring repeated values before resetting the navigation state so it only happens when the preference actually flips.

Useful? React with 👍 / 👎.

This commit refactors the "Playlist View" toggle within the `LibrarySortBottomSheet` to introduce animations and improve its visual styling.

Key changes include:
- The `Surface` containing the view toggle has been replaced with a `Box`.
- The background color and corner radius of the view toggle container are now animated based on the toggle's checked state.
- A custom `AbsoluteSmoothCornerShape` is used to create a "squircle" effect for the container.
- The `Switch` component has been restyled with custom colors and a check icon in the thumb when enabled.
- Typography styles and padding have been updated for better visual alignment and hierarchy.
@theovilardo theovilardo merged commit f41779d into master Oct 23, 2025
@lostf1sh lostf1sh deleted the codex/add-playlist-view-toggle-to-folders-tab branch January 16, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant