mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix reordering playlist
This commit is contained in:
@@ -67,7 +67,9 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro
|
||||
if (previousIndex === newIndex) return
|
||||
|
||||
const oldPosition = this.videos[previousIndex].playlistElement.position
|
||||
const insertAfter = newIndex === 0 ? 0 : this.videos[newIndex].playlistElement.position
|
||||
let insertAfter = this.videos[newIndex].playlistElement.position
|
||||
|
||||
if (oldPosition > insertAfter) insertAfter--
|
||||
|
||||
this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter)
|
||||
.subscribe(
|
||||
|
||||
Reference in New Issue
Block a user