Fix:Remove last saved library id when changing servers so home page shelves load on init

This commit is contained in:
advplyr
2022-06-05 16:32:28 -05:00
parent d7dcaa22a6
commit 870774b408
10 changed files with 33 additions and 16 deletions
+7 -3
View File
@@ -122,11 +122,15 @@ export default {
this.show = false
},
async logout() {
await this.$axios.$post('/logout').catch((error) => {
console.error(error)
})
if (this.user) {
await this.$axios.$post('/logout').catch((error) => {
console.error(error)
})
}
this.$socket.logout()
await this.$db.logout()
this.$localStore.removeLastLibraryId()
this.$store.commit('user/logout')
this.$router.push('/connect')
},
+1 -1
View File
@@ -382,7 +382,7 @@ export default {
this.resetEntities()
}
},
libraryChanged(libid) {
libraryChanged() {
if (this.hasFilter) {
this.clearFilter()
} else {
+1 -1
View File
@@ -51,7 +51,7 @@ export default {
async clickedOption(lib) {
this.show = false
await this.$store.dispatch('libraries/fetch', lib.id)
this.$eventBus.$emit('library-changed', lib.id)
this.$eventBus.$emit('library-changed')
this.$localStore.setLastLibraryId(lib.id)
}
},