Merged
Conversation
…list"
- **Quick Settings Tiles**:
- Add `ShuffleAllTileService` to allow users to trigger a shuffled playback of all songs from the system notification shade.
- Add `LastPlaylistTileService` to resume the most recently played playlist via a Quick Settings tile.
- **Data & Preferences**:
- Update `UserPreferencesRepository` to persist the last played playlist ID and name.
- Modify `AppShortcutManager` to sync last playlist data with `DataStore`, enabling access even when the app is closed.
- **Player & ViewModel**:
- Implement `triggerShuffleAllFromTile` in `PlayerViewModel` with retry logic to ensure playback starts correctly during cold starts or before the database is fully ready.
- Introduce `isMediaControllerReady` flow to synchronize UI navigation and playback actions with the Media3 controller state.
- **App Integration**:
- Update `MainActivity` to handle `ACTION_SHUFFLE_ALL` and `ACTION_OPEN_PLAYLIST` intents from both launcher shortcuts and Quick Settings tiles.
- Register new tile services in `AndroidManifest.xml` and add corresponding string resources.
- **PlayerViewModel**:
- Refactor `triggerShuffleAllFromTile` to use `allSongsFlow` instead of querying the database directly, ensuring it pulls from the in-memory library state.
- Implement a sync-and-wait mechanism (up to 30 seconds) if the library is empty on cold start before attempting playback.
- Shuffle a subset of up to 500 songs to improve performance when starting playback from the tile.
- Add comprehensive logging and toast notifications for better debugging and user feedback when no songs are found.
- **MainActivity**:
- Add logging to `handleIntent` to track `ACTION_SHUFFLE_ALL` triggers from the system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.