Update:Persist scroll position for bookshelves #604

This commit is contained in:
advplyr 2022-05-18 18:37:38 -05:00
parent eba37c46cb
commit 7e5ab477b2
2 changed files with 28 additions and 1 deletions

View file

@ -19,7 +19,8 @@ export const state = () => ({
backups: [],
bookshelfBookIds: [],
openModal: null,
selectedBookshelfTexture: '/textures/wood_default.jpg'
selectedBookshelfTexture: '/textures/wood_default.jpg',
lastBookshelfScrollData: {}
})
export const getters = {
@ -80,6 +81,9 @@ export const actions = {
}
export const mutations = {
setLastBookshelfScrollData(state, { scrollTop, path, name }) {
state.lastBookshelfScrollData[name] = { scrollTop, path }
},
setBookshelfBookIds(state, val) {
state.bookshelfBookIds = val || []
},