Fixed Next button behavior when Repeat All is enabled
This commit is contained in:
parent
f361f584b9
commit
6a53644355
|
@ -304,15 +304,8 @@ public class PlayerFragment extends Fragment implements GestureDetector.OnGestur
|
||||||
@Override
|
@Override
|
||||||
protected Boolean doInBackground()
|
protected Boolean doInBackground()
|
||||||
{
|
{
|
||||||
if (mediaPlayerControllerLazy.getValue().getCurrentPlayingNumberOnPlaylist() < mediaPlayerControllerLazy.getValue().getPlaylistSize() - 1)
|
mediaPlayerControllerLazy.getValue().next();
|
||||||
{
|
return true;
|
||||||
mediaPlayerControllerLazy.getValue().next();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -458,7 +458,20 @@ public class MediaPlayerControllerImpl implements MediaPlayerController
|
||||||
int index = downloader.getCurrentPlayingIndex();
|
int index = downloader.getCurrentPlayingIndex();
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
play(index + 1);
|
switch (getRepeatMode())
|
||||||
|
{
|
||||||
|
case SINGLE:
|
||||||
|
case OFF:
|
||||||
|
if (index + 1 >= 0 && index + 1 < downloader.downloadList.size()) {
|
||||||
|
play(index + 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ALL:
|
||||||
|
play((index + 1) % downloader.downloadList.size());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue