Skip to content

Commit 98e9703

Browse files
authored
connect: handle dnd of current track (#1449)
1 parent 5f7cfdc commit 98e9703

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

connect/src/state/tracks.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ impl<'ct> ConnectState {
249249
self.queue_count += 1;
250250
});
251251

252+
// when you drag 'n drop the current track in the queue view into the "Next from: ..."
253+
// section, it is only send as an empty item with just the provider and metadata, so we have
254+
// to provide set the uri from the current track manually
255+
tracks
256+
.iter_mut()
257+
.filter(|t| t.uri.is_empty())
258+
.for_each(|t| t.uri = self.current_track(|ct| ct.uri.clone()));
259+
252260
self.player_mut().next_tracks = tracks;
253261
}
254262

0 commit comments

Comments
 (0)