[PR #54] [MERGED] Action on item improvements #606

Closed
opened 2026-03-02 23:49:01 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/54
Author: @aome510
Created: 6/12/2022
Status: Merged
Merged: 6/12/2022
Merged by: @aome510

Base: masterHead: item-action-improvements


📝 Commits (10+)

  • 2b1bfe6 force re-fetching the context page after PreviousPage command
  • ca0afb5 rewrite "action-on-item" code to be more item specific
  • 392dba9 add ClientRequest::GetUserSavedTracks and its handler
  • 7797115 handle add/remove to liked track actions on a track
  • 8ebd651 update user data in state directly after handling ClientRequest::SaveToLibrary
  • e0e34b7 add ClientRequest::DeleteFromLibrary and its handler
  • 45b4e66 handle delete from library actions on item
  • bbfb105 implement auto-indexing [1] for list window in library page
  • 71e19af remove RemoveFromCurrentPlaylist track action
  • 37d1c08 add more comments in client/mod.rs

📊 Changes

13 files changed (+440 additions, -174 deletions)

View changed files

📝 spotify_player/src/client/mod.rs (+84 -2)
📝 spotify_player/src/command.rs (+25 -5)
📝 spotify_player/src/event/mod.rs (+31 -6)
📝 spotify_player/src/event/page.rs (+8 -4)
📝 spotify_player/src/event/popup.rs (+98 -82)
📝 spotify_player/src/event/window.rs (+86 -7)
📝 spotify_player/src/main.rs (+1 -2)
📝 spotify_player/src/state/data.rs (+3 -0)
📝 spotify_player/src/state/model.rs (+8 -35)
📝 spotify_player/src/state/ui/popup.rs (+48 -3)
📝 spotify_player/src/ui/mod.rs (+21 -17)
📝 spotify_player/src/ui/page.rs (+22 -3)
📝 spotify_player/src/ui/popup.rs (+5 -8)

📄 Description

Changes

  • remove the Action struct in favour of more specific item-based structs, such TrackAction, AlbumAction, etc
  • add ClientRequest::{GetUserSavedTracks, RemoveFromLibrary}, rename ClientRequest::SaveToLibrary to ClientRequest::AddToLibrary
  • update the action-on-item handlers to include "delete-from-library" action

🔄 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/54 **Author:** [@aome510](https://github.com/aome510) **Created:** 6/12/2022 **Status:** ✅ Merged **Merged:** 6/12/2022 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `item-action-improvements` --- ### 📝 Commits (10+) - [`2b1bfe6`](https://github.com/aome510/spotify-player/commit/2b1bfe63e701aab6ffd3c6055ac46920dcf6c5ec) force re-fetching the context page after `PreviousPage` command - [`ca0afb5`](https://github.com/aome510/spotify-player/commit/ca0afb5fee397662c5e1739a19d30fa7ccb43af7) rewrite "action-on-item" code to be more item specific - [`392dba9`](https://github.com/aome510/spotify-player/commit/392dba977f4a966d15674df082480238f89fbe95) add `ClientRequest::GetUserSavedTracks` and its handler - [`7797115`](https://github.com/aome510/spotify-player/commit/7797115c1b9350ca5b62fc56116e1319972b9199) handle add/remove to liked track actions on a track - [`8ebd651`](https://github.com/aome510/spotify-player/commit/8ebd651d2772e00464fcaa6b9f0d5b7e8b7beda8) update user data in state directly after handling `ClientRequest::SaveToLibrary` - [`e0e34b7`](https://github.com/aome510/spotify-player/commit/e0e34b77cdafa6ac771d9bc26efcac8805e88c3b) add `ClientRequest::DeleteFromLibrary` and its handler - [`45b4e66`](https://github.com/aome510/spotify-player/commit/45b4e6622d0d1e30988b6599476a0c3c24fd290a) handle delete from library actions on item - [`bbfb105`](https://github.com/aome510/spotify-player/commit/bbfb10526cd1ea49fd523856f4e1be8c53b441fb) implement auto-indexing [1] for list window in library page - [`71e19af`](https://github.com/aome510/spotify-player/commit/71e19af7862ace5fe7b1069d08fd7659aa4a8667) remove `RemoveFromCurrentPlaylist` track action - [`37d1c08`](https://github.com/aome510/spotify-player/commit/37d1c08a51ab774d669cc017320d4cbf75f714e2) add more comments in `client/mod.rs` ### 📊 Changes **13 files changed** (+440 additions, -174 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/client/mod.rs` (+84 -2) 📝 `spotify_player/src/command.rs` (+25 -5) 📝 `spotify_player/src/event/mod.rs` (+31 -6) 📝 `spotify_player/src/event/page.rs` (+8 -4) 📝 `spotify_player/src/event/popup.rs` (+98 -82) 📝 `spotify_player/src/event/window.rs` (+86 -7) 📝 `spotify_player/src/main.rs` (+1 -2) 📝 `spotify_player/src/state/data.rs` (+3 -0) 📝 `spotify_player/src/state/model.rs` (+8 -35) 📝 `spotify_player/src/state/ui/popup.rs` (+48 -3) 📝 `spotify_player/src/ui/mod.rs` (+21 -17) 📝 `spotify_player/src/ui/page.rs` (+22 -3) 📝 `spotify_player/src/ui/popup.rs` (+5 -8) </details> ### 📄 Description ## Changes - remove the `Action` struct in favour of more specific item-based structs, such `TrackAction`, `AlbumAction`, etc - add `ClientRequest::{GetUserSavedTracks, RemoveFromLibrary}`, rename `ClientRequest::SaveToLibrary` to `ClientRequest::AddToLibrary` - update the action-on-item handlers to include "delete-from-library" action --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:01 +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#606
No description provided.