File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ app.controller('PlaylistsCtrl', function (
1111 $stateParams ,
1212 notificationFactory ,
1313 modalFactory ,
14- utilsService
14+ utilsService ,
15+ queueService
1516) {
1617 var endpoint = 'me/playlists'
1718 , params = '' ;
@@ -74,11 +75,13 @@ app.controller('PlaylistsCtrl', function (
7475 $log . log ( response ) ;
7576 return $q . reject ( response . data ) ;
7677 } ) . finally ( function ( ) {
77- $state . transitionTo ( $state . current , $stateParams , {
78- reload : true ,
79- inherit : false ,
80- notify : true
81- } ) ;
78+ var inQueue = queueService . find ( songId ) ;
79+
80+ $ ( '#' + songId ) . remove ( ) ;
81+
82+ if ( inQueue ) {
83+ queueService . remove ( inQueue ) ;
84+ }
8285 } )
8386
8487 } , function ( error ) {
@@ -105,11 +108,7 @@ app.controller('PlaylistsCtrl', function (
105108 notificationFactory . error ( "Something went wrong!" ) ;
106109 } )
107110 . finally ( function ( ) {
108- $state . transitionTo ( $state . current , $stateParams , {
109- reload : true ,
110- inherit : false ,
111- notify : true
112- } ) ;
111+ $ ( '#' + playlistId ) . remove ( ) ;
113112 } ) ;
114113 } ) ;
115114 } ;
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ <h1> {{ title }}</h1>
88 ng-class ="{ playlist: data.kind } "
99 data-kind ="{{ data.kind }} "
1010 ng-if ="data.kind == 'playlist' "
11- data-playlist-hidden ="true " >
11+ data-playlist-hidden ="true "
12+ id ="{{data.id}} ">
1213
1314 < h4 class ="songList_item_song_user " collapsible > {{ data.title }} playlist - < span > show</ span > </ h4 >
1415 < span class ="mediaBox_item_info ">
@@ -26,7 +27,8 @@ <h4 class="songList_item_song_user" collapsible>{{ data.title }} playlist - <spa
2627 ng-repeat ="tracks in data.tracks "
2728 ng-class ="{ active: hover } "
2829 ng-mouseover ="hover = true "
29- ng-mouseleave ="hover = false " >
30+ ng-mouseleave ="hover = false "
31+ id ="{{tracks.id}} ">
3032
3133 < div class ="songList_item_container_artwork ">
3234 < span class ="songList_item_song_button "
@@ -64,6 +66,4 @@ <h4 class="songList_item_song_user">
6466 </ div >
6567 <!-- Song list wrapper / end -->
6668
67- < div ng-include ="'views/common/loading.html' "> </ div >
68-
6969</ div >
You can’t perform that action at this time.
0 commit comments