mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 04:48:36 +02:00
Check app version, fix close stream bug, show audiobook progress, add toasts
This commit is contained in:
@@ -33,6 +33,7 @@ class Server extends EventEmitter {
|
||||
setUser(user) {
|
||||
this.user = user
|
||||
this.store.commit('user/setUser', user)
|
||||
this.store.commit('user/setSettings', user.settings)
|
||||
if (user) {
|
||||
localStorage.setItem('userToken', user.token)
|
||||
} else {
|
||||
@@ -149,6 +150,11 @@ class Server extends EventEmitter {
|
||||
this.emit('initialStream', data.stream)
|
||||
}
|
||||
})
|
||||
this.socket.on('user_updated', (user) => {
|
||||
if (this.user && user.id === this.user.id) {
|
||||
this.setUser(user)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user