Prevent single-key unsaving of created playlists

This commit is contained in:
KoffeinFlummi
2019-04-28 10:56:38 +02:00
parent eed3edfa59
commit fd3dbd0a6a

View File

@@ -128,6 +128,11 @@ impl ListItem for Playlist {
}
fn toggle_saved(&mut self, library: Arc<Library>) {
// Don't allow users to unsave their own playlists with one keypress
if !library.is_followed_playlist(self) {
return;
}
if library.is_saved_playlist(self) {
library.delete_playlist(&self.id);
} else {