Update:Save last scroll position for item pages #717

This commit is contained in:
advplyr 2023-06-04 15:52:36 -05:00
parent 2643e98fc0
commit d207e88e18
2 changed files with 16 additions and 2 deletions

View file

@ -22,7 +22,8 @@ export const state = () => ({
showSideDrawer: false,
isNetworkListenerInit: false,
serverSettings: null,
lastBookshelfScrollData: {}
lastBookshelfScrollData: {},
lastItemScrollData: {}
})
export const getters = {
@ -89,6 +90,9 @@ export const mutations = {
setLastBookshelfScrollData(state, { scrollTop, path, name }) {
state.lastBookshelfScrollData[name] = { scrollTop, path }
},
setLastItemScrollData(state, data) {
state.lastItemScrollData = data
},
setPlayerItem(state, playbackSession) {
state.playerIsLocal = playbackSession ? playbackSession.playMethod == this.$constants.PlayMethod.LOCAL : false