Skip to content

Commit

Permalink
connect: handle dnd of current track (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex authored Jan 23, 2025
1 parent 5f7cfdc commit 98e9703
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions connect/src/state/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ impl<'ct> ConnectState {
self.queue_count += 1;
});

// when you drag 'n drop the current track in the queue view into the "Next from: ..."
// section, it is only send as an empty item with just the provider and metadata, so we have
// to provide set the uri from the current track manually
tracks
.iter_mut()
.filter(|t| t.uri.is_empty())
.for_each(|t| t.uri = self.current_track(|ct| ct.uri.clone()));

self.player_mut().next_tracks = tracks;
}

Expand Down

0 comments on commit 98e9703

Please sign in to comment.