mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix: bottom bar fav button bug
~ bug caused by toggling and untoggling the fav state
This commit is contained in:
committed by
Mungai Njoroge
parent
0f0f0e0762
commit
6095c9fa8f
@@ -89,8 +89,8 @@ function handleFav() {
|
|||||||
queue.currenttrack?.is_favorite,
|
queue.currenttrack?.is_favorite,
|
||||||
favType.track,
|
favType.track,
|
||||||
queue.currenttrack?.trackhash || "",
|
queue.currenttrack?.trackhash || "",
|
||||||
() => queue.toggleFav(queue.currentindex),
|
() => null,
|
||||||
() => queue.toggleFav(queue.currentindex)
|
() => null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ async function createNewPlaylist(playlist_name: string, track?: Track) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (status == 201) {
|
if (status == 201) {
|
||||||
new Notification("✅ Playlist created successfullly!");
|
new Notification("Playlist created successfullly!");
|
||||||
|
|
||||||
if (track) {
|
if (track) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -75,11 +75,11 @@ async function addTrackToPlaylist(playlist: Playlist, track: Track) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (status == 409) {
|
if (status == 409) {
|
||||||
new Notification("Track already exists in playlist", NotifType.Info);
|
new Notification("Track already exists in playlist");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new Notification(track.title + " added to " + playlist.name);
|
new Notification(track.title + " added to " + playlist.name, NotifType.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPlaylist(pid: string) {
|
async function getPlaylist(pid: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user