Refactor the simplified playlist function
This commit is contained in:
committed by
Henrik Friedrichsen
parent
0f0b2f3e2a
commit
5981b08458
@@ -35,7 +35,7 @@ impl PlaylistView {
|
||||
|
||||
if let Some(playlist) = current {
|
||||
let playlists = self.playlists.clone();
|
||||
let id = playlist.meta.id.clone();
|
||||
let id = playlist.id.clone();
|
||||
let dialog = Dialog::text("Are you sure you want to delete this playlist?")
|
||||
.padding((1, 1, 1, 0))
|
||||
.title("Delete playlist")
|
||||
|
||||
@@ -68,7 +68,7 @@ impl QueueView {
|
||||
list_select.add_item("[Create new]", None);
|
||||
|
||||
for list in playlists.items().iter() {
|
||||
list_select.add_item(list.meta.name.clone(), Some(list.meta.id.clone()));
|
||||
list_select.add_item(list.name.clone(), Some(list.id.clone()));
|
||||
}
|
||||
|
||||
list_select.set_on_submit(move |s, selected| {
|
||||
|
||||
@@ -129,7 +129,7 @@ impl SearchView {
|
||||
.playlists
|
||||
.items
|
||||
.iter()
|
||||
.map(|sp| Playlists::process_playlist(sp, &&spotify))
|
||||
.map(|sp| Playlists::process_simplified_playlist(sp, &&spotify))
|
||||
.collect();
|
||||
let mut r = playlists.write().unwrap();
|
||||
*r = pls;
|
||||
|
||||
Reference in New Issue
Block a user