diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-21 09:34:02 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-21 09:34:02 +0200 |
commit | fd822c1c699fb89bb1c3218e047e1d842bc1ba1a (patch) | |
tree | 4f7e81261f2dc07aa75a83e97f25da1f11e146ea /client/src/app/+my-account | |
parent | b5bfadf0b5365481179936fd3058134fd8be8e18 (diff) | |
parent | 4550872bcc8f9ef46183463c7b7b74a90cb6d17c (diff) | |
download | PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.tar.gz PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.tar.zst PeerTube-fd822c1c699fb89bb1c3218e047e1d842bc1ba1a.zip |
Merge branch 'release/v1.3.0' into develop
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts index 25d51d2cb..03f34412c 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.ts | |||
@@ -67,7 +67,9 @@ export class MyAccountVideoPlaylistElementsComponent implements OnInit, OnDestro | |||
67 | if (previousIndex === newIndex) return | 67 | if (previousIndex === newIndex) return |
68 | 68 | ||
69 | const oldPosition = this.videos[previousIndex].playlistElement.position | 69 | const oldPosition = this.videos[previousIndex].playlistElement.position |
70 | const insertAfter = newIndex === 0 ? 0 : this.videos[newIndex].playlistElement.position | 70 | let insertAfter = this.videos[newIndex].playlistElement.position |
71 | |||
72 | if (oldPosition > insertAfter) insertAfter-- | ||
71 | 73 | ||
72 | this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter) | 74 | this.videoPlaylistService.reorderPlaylist(this.playlist.id, oldPosition, insertAfter) |
73 | .subscribe( | 75 | .subscribe( |