fix(dashboard): improve loop action for player

This commit is contained in:
KostyaDanovsky 2017-09-18 12:07:37 +03:00
parent 21339d327f
commit 4a752483c0

View file

@ -21,20 +21,24 @@ export class PlayerComponent {
}
prev() {
if (this.shuffle) {
this.track = this.playerService.random();
} else {
this.track = this.playerService.prev();
if (!this.player.loop) {
if (this.shuffle) {
this.track = this.playerService.random();
} else {
this.track = this.playerService.prev();
}
}
this.reload();
}
next() {
if (this.shuffle) {
this.track = this.playerService.random();
} else {
this.track = this.playerService.next();
if (!this.player.loop) {
if (this.shuffle) {
this.track = this.playerService.random();
} else {
this.track = this.playerService.next();
}
}
this.reload();