Repository: aome510/spotify-player (language: rust)

Issue:
Incorrect like status in ShowActions
**Describe the bug**
A clear and concise description of what the bug is.
If i open a ShowActionOnSelectedItem, it will show "AddLiked" when its already liked and "DeleteFromLiked" when its not liked. Clicking on them will not do anything, at least not that i can detect.

**To Reproduce**
Open Spotify-player. use Showactionsonselecteditem or ShowActionsOnCurrentTrack

**Expected behaviour**
It should show vice versa and actually like/dislike the selected item


**Screenshots**
![image](https://github.com/aome510/spotify-player/assets/92977828/cd6137dc-7fa6-48b9-8201-8fa8d8e7a375)


- OS:
- Application version: [bcba2e6](https://github.com/aome510/spotify-player/tree/bcba2e6cfa4ac989e003345b40c5809498805837)
- Application features: streaming,daemon,rodio,lyrics.image,notify,sixel,fzf
**Additional context**


Incorrect like status in ShowActions
**Describe the bug**
A clear and concise description of what the bug is.
If i open a ShowActionOnSelectedItem, it will show "AddLiked" when its already liked and "DeleteFromLiked" when its not liked. Clicking on them will not do anything, at least not that i can detect.

**To Reproduce**
Open Spotify-player. use Showactionsonselecteditem or ShowActionsOnCurrentTrack

**Expected behaviour**
It should show vice versa and actually like/dislike the selected item


**Screenshots**
![image](https://github.com/aome510/spotify-player/assets/92977828/cd6137dc-7fa6-48b9-8201-8fa8d8e7a375)


- OS:
- Application version: [bcba2e6](https://github.com/aome510/spotify-player/tree/bcba2e6cfa4ac989e003345b40c5809498805837)
- Application features: streaming,daemon,rodio,lyrics.image,notify,sixel,fzf
**Additional context**




Discussion / hints:
Right, it's a bug introduced in https://github.com/aome510/spotify-player/commit/bcba2e6cfa4ac989e003345b40c5809498805837#diff-aaa651a1b85c3377b86aecc56c92a0ceed8bc99d8c65025356684c2eea3b55edL137-L141.

Thanks for reporting.
Right, it's a bug introduced in https://github.com/aome510/spotify-player/commit/bcba2e6cfa4ac989e003345b40c5809498805837#diff-aaa651a1b85c3377b86aecc56c92a0ceed8bc99d8c65025356684c2eea3b55edL137-L141.

Thanks for reporting.

Fix patch:
diff --git a/spotify_player/src/command.rs b/spotify_player/src/command.rs
index a525e5e2..332565ba 100644
--- a/spotify_player/src/command.rs
+++ b/spotify_player/src/command.rs
@@ -160,9 +160,9 @@ pub fn construct_track_actions(track: &Track, data: &DataReadGuard) -> Vec<Actio
     ];
 
     if data.user_data.is_liked_track(track) {
-        actions.push(Action::AddToLiked);
-    } else {
         actions.push(Action::DeleteFromLiked);
+    } else {
+        actions.push(Action::AddToLiked);
     }
 
     actions


Test patch: