Skip to content

Optim/unified player sheet new#1010

Merged
theovilardo merged 2 commits intomasterfrom
optim/unified-player-sheet-new
Feb 8, 2026
Merged

Optim/unified player sheet new#1010
theovilardo merged 2 commits intomasterfrom
optim/unified-player-sheet-new

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

- **Performance Optimizations**:
    - Wrap `ImageRequest` in `remember` within `OptimizedAlbumArt` and `SmartImage` to prevent unnecessary object allocation and recompositions.
    - Reduce recompositions in `MainActivity` and `QueueBottomSheet` by using `derivedStateOf` and `distinctUntilChanged` on player state flows.
    - Remove `Trace` calls and unused variables/imports in `UnifiedPlayerSheet` and `FullPlayerContent`.
    - Improve `QueueBottomSheet` efficiency by filtering out rapid position updates from the collected player state.

- **UI & Expansion Logic**:
    - Fix "dead" touch zones in `DelayedContent` by forcing the gate open when the player is fully expanded.
    - Ensure `FullPlayerContent` components are composed slightly before they become visible to improve interaction readiness.
    - Decouple remote playback and Bluetooth state collection from nested composables in `FullPlayerContent` to improve stability.
    - Update `contentAppearThresholdPercent` default from 100 to 0 and expand its slider range in Experimental Settings (0-100) for more flexible placeholder behavior.

- **Bug Fixes & Refinements**:
    - Fix layout issues in `QueueBottomSheet` by ensuring height measurements are updated correctly on globally positioned events.
    - Simplify `UnifiedPlayerSheet` by removing complex derived height calculations and unused alpha blending logic.
    - Pass `isCastConnecting` state explicitly to sub-components in `FullPlayerContent`.
- **UI Enhancements**:
    - Introduced `CircularWavyProgressIndicator` from Material3 Expressive API to indicate playback preparation in the mini-player.
    - Added "Preparing playback..." and "Loading audio..." status text to the mini-player during song buffering.
    - Improved color scheme transitions in `UnifiedPlayerSheet` to better sync with the currently active song and its album art.

- **Playback Logic**:
    - Added a `preparingSongId` state to track and display the loading status of specific tracks.
    - Updated `PlayerViewModel` to proactively trigger color scheme generation when a song begins preparing, improving theme responsiveness.
    - Implemented logic to clear the "preparing" state once the media engine reports `STATE_READY` or playback begins.
    - Refined mini-player visibility logic to ensure smoother entrance animations when a song is loaded.

- **Technical Improvements**:
    - Exposed `currentAlbumArtUri` from `ThemeStateHolder` as a `StateFlow` to allow UI components to track the source of the current theme.
    - Optimized color scheme selection logic to avoid flickering when transitioning between tracks with different artwork.
    - Enabled `ExperimentalMaterial3ExpressiveApi` for advanced UI components.
@theovilardo theovilardo merged commit 6f9607d into master Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant