move to a separate save/delete binding approach
this is to address accidental deletions of playlists/tracks that some users faced closes #75 related #15
This commit is contained in:
@@ -154,6 +154,14 @@ impl ListItem for Playlist {
|
||||
}
|
||||
}
|
||||
|
||||
fn save(&mut self, library: Arc<Library>) {
|
||||
library.follow_playlist(self);
|
||||
}
|
||||
|
||||
fn unsave(&mut self, library: Arc<Library>) {
|
||||
library.delete_playlist(&self.id);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user