diff options
author | daneren2005 <daneren2005@gmail.com> | 2014-04-28 12:54:17 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2014-04-28 12:54:17 -0700 |
commit | 9e5a755dce7de38e5bb930132327177ca62f1eed (patch) | |
tree | bd726230947833a248508fd5422aeb1c17943a5c /src/github | |
parent | 0232fb2571054f5174602b35d1870b5d38c9356b (diff) | |
download | dsub-9e5a755dce7de38e5bb930132327177ca62f1eed.tar.gz dsub-9e5a755dce7de38e5bb930132327177ca62f1eed.tar.bz2 dsub-9e5a755dce7de38e5bb930132327177ca62f1eed.zip |
#339 Fix two cases of drag/drop wrong next playing
1) Fix when dragging the song that is playing somewhere else continuing onto the previously next song.
2) Fix #339. The check was correct, but the currentPlayingIndex was not being updated before doing the check.
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 66295d5e..f4edb004 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -1521,10 +1521,11 @@ public class DownloadService extends Service { int currentPlayingIndex = getCurrentPlayingIndex(); DownloadFile movedSong = list.remove(from); list.add(to, movedSong); + currentPlayingIndex = downloadList.indexOf(currentPlaying); if(remoteState != RemoteControlState.LOCAL && mainList) { updateJukeboxPlaylist(); - } else if(mainList && (movedSong == nextPlaying || (currentPlayingIndex + 1) == to)) { - // Moving next playing or moving a song to be next playing + } else if(mainList && (movedSong == nextPlaying || movedSong == currentPlaying || (currentPlayingIndex + 1) == to)) { + // Moving next playing, current playing, or moving a song to be next playing setNextPlaying(); } } |