Skip to content

Impl/quick settings tiles#1145

Merged
theovilardo merged 2 commits intomasterfrom
impl/quick-settings-tiles
Feb 19, 2026
Merged

Impl/quick settings tiles#1145
theovilardo merged 2 commits intomasterfrom
impl/quick-settings-tiles

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

…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.
@theovilardo theovilardo merged commit 927182d into master Feb 19, 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