mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-16 08:54:47 +02:00
Fix:Playlist tab not shown after adding first playlist #1092
This commit is contained in:
parent
c04c7a55d9
commit
da3882fd5e
3 changed files with 10 additions and 8 deletions
|
@ -48,11 +48,7 @@ class ServerSocket extends EventEmitter {
|
|||
this.socket.on('init', this.onInit.bind(this))
|
||||
this.socket.on('user_updated', this.onUserUpdated.bind(this))
|
||||
this.socket.on('user_item_progress_updated', this.onUserItemProgressUpdated.bind(this))
|
||||
|
||||
// Good for testing socket requests
|
||||
// this.socket.onAny((evt, args) => {
|
||||
// console.log(`[SOCKET] onAny: ${this.socket.id}: ${evt} ${JSON.stringify(args)}`)
|
||||
// })
|
||||
this.socket.on('playlist_added', this.onPlaylistAdded.bind(this))
|
||||
}
|
||||
|
||||
removeListeners() {
|
||||
|
@ -93,6 +89,13 @@ class ServerSocket extends EventEmitter {
|
|||
this.$store.commit('user/updateUserMediaProgress', payload.data)
|
||||
this.emit('user_media_progress_updated', payload)
|
||||
}
|
||||
|
||||
onPlaylistAdded() {
|
||||
// Currently numUserPlaylists is only used for showing the playlist tab or not. Precise number is not necessary
|
||||
if (!this.$store.state.libraries.numUserPlaylists) {
|
||||
this.$store.commit('libraries/setNumUserPlaylists', 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default ({ app, store }, inject) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue