[PR #933] [MERGED] feat: remember Tracks context in Currently Playing page #1870

Closed
opened 2026-03-14 15:37:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/933
Author: @aome510
Created: 2/18/2026
Status: Merged
Merged: 2/18/2026
Merged by: @aome510

Base: masterHead: tracks-currently-playing


📝 Commits (2)

  • 44111fc feat: remember Tracks context in Currently Playing page
  • 4f50078 fmt

📊 Changes

5 files changed (+45 additions, -5 deletions)

View changed files

📝 spotify_player/src/client/handlers.rs (+8 -1)
📝 spotify_player/src/event/mod.rs (+8 -1)
📝 spotify_player/src/event/window.rs (+21 -0)
📝 spotify_player/src/state/ui/mod.rs (+5 -0)
📝 spotify_player/src/state/ui/page.rs (+3 -3)

📄 Description

Add support for preserving Tracks context (Top Tracks, Recently Played, Liked Tracks) when navigating to the Currently Playing page.

Since Spotify's native API only recognizes Playlist, Album, Artist, and Show as playback contexts, custom Tracks contexts were previously lost when viewing the Currently Playing page. This change tracks the currently playing Tracks context in UIState and displays it appropriately.

Resolves #825

Changes

  • Add currently_playing_tracks_id field to UIState to store the active Tracks context
  • Modify ContextPageType::CurrentPlaying to accept optional TracksId, indicating the currently playing Tracks context
  • Update playback handlers to set/clear currently_playing_tracks_id:
    • Set when playing from Tracks contexts (Top/Recent/Liked Tracks)
    • Clear when playing from other contexts (Playlist, Album, Show, etc.)

This allows users to see and navigate the Tracks context list when viewing the Currently Playing page after playing from these contexts.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/933 **Author:** [@aome510](https://github.com/aome510) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `tracks-currently-playing` --- ### 📝 Commits (2) - [`44111fc`](https://github.com/aome510/spotify-player/commit/44111fc4e1eb0e0278d86215107a4d1492cc4a17) feat: remember Tracks context in Currently Playing page - [`4f50078`](https://github.com/aome510/spotify-player/commit/4f50078160cee9e2f6ad4521ae102fdecf0e0bad) fmt ### 📊 Changes **5 files changed** (+45 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/client/handlers.rs` (+8 -1) 📝 `spotify_player/src/event/mod.rs` (+8 -1) 📝 `spotify_player/src/event/window.rs` (+21 -0) 📝 `spotify_player/src/state/ui/mod.rs` (+5 -0) 📝 `spotify_player/src/state/ui/page.rs` (+3 -3) </details> ### 📄 Description Add support for preserving Tracks context (Top Tracks, Recently Played, Liked Tracks) when navigating to the Currently Playing page. Since Spotify's native API only recognizes Playlist, Album, Artist, and Show as playback contexts, custom Tracks contexts were previously lost when viewing the Currently Playing page. This change tracks the currently playing Tracks context in `UIState` and displays it appropriately. Resolves #825 ## Changes - Add `currently_playing_tracks_id` field to `UIState` to store the active Tracks context - Modify `ContextPageType::CurrentPlaying` to accept optional `TracksId`, indicating the currently playing Tracks context - Update playback handlers to set/clear `currently_playing_tracks_id`: - Set when playing from Tracks contexts (Top/Recent/Liked Tracks) - Clear when playing from other contexts (Playlist, Album, Show, etc.) This allows users to see and navigate the Tracks context list when viewing the Currently Playing page after playing from these contexts. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:37:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1870
No description provided.