fix: bottom bar fav button bug

~ bug caused by toggling and untoggling the fav state
This commit is contained in:
geoffrey45
2023-01-03 22:27:03 +03:00
committed by Mungai Njoroge
parent 0f0f0e0762
commit 6095c9fa8f
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -89,8 +89,8 @@ function handleFav() {
queue.currenttrack?.is_favorite,
favType.track,
queue.currenttrack?.trackhash || "",
() => queue.toggleFav(queue.currentindex),
() => queue.toggleFav(queue.currentindex)
() => null,
() => null
);
}
</script>
+3 -3
View File
@@ -23,7 +23,7 @@ async function createNewPlaylist(playlist_name: string, track?: Track) {
});
if (status == 201) {
new Notification("Playlist created successfullly!");
new Notification("Playlist created successfullly!");
if (track) {
setTimeout(() => {
@@ -75,11 +75,11 @@ async function addTrackToPlaylist(playlist: Playlist, track: Track) {
});
if (status == 409) {
new Notification("Track already exists in playlist", NotifType.Info);
new Notification("Track already exists in playlist");
return;
}
new Notification(track.title + " added to " + playlist.name);
new Notification(track.title + " added to " + playlist.name, NotifType.Success);
}
async function getPlaylist(pid: string) {