Skip to content

Commit

Permalink
Make playlist sorting persistent, too
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan committed Feb 12, 2017
1 parent 50ccd75 commit f5e1665
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
/>
</h1>

<song-list v-show="playlist.songs.length" :items="playlist.songs" :playlist="playlist" type="playlist"/>
<song-list v-show="playlist.songs.length"
:items="playlist.songs"
:playlist="playlist"
type="playlist"
ref="songList"
/>

<div v-show="!playlist.songs.length" class="none">
The playlist is currently empty. You can fill it up by dragging songs into its name in the sidebar,
Expand Down Expand Up @@ -69,6 +74,10 @@ export default {
event.on('main-content-view:load', (view, playlist) => {
if (view === 'playlist') {
this.playlist = playlist
// #530
this.$nextTick(() => {
this.$refs.songList.sort()
})
}
})
},
Expand Down

0 comments on commit f5e1665

Please sign in to comment.