Update:Remove RSS feeds from login response payload and include feeds from library items request

This commit is contained in:
advplyr 2022-12-31 10:59:12 -06:00
parent 8bbfee334c
commit 0e6b0d3eff
9 changed files with 36 additions and 55 deletions

View file

@ -260,7 +260,7 @@ export default {
return this.bookCoverAspectRatio === 1
},
sizeMultiplier() {
var baseSize = this.squareAspectRatio ? 192 : 120
const baseSize = this.squareAspectRatio ? 192 : 120
return this.width / baseSize
},
title() {
@ -538,11 +538,11 @@ export default {
return this.author
},
isAlternativeBookshelfView() {
var constants = this.$constants || this.$nuxt.$constants
const constants = this.$constants || this.$nuxt.$constants
return this.bookshelfView === constants.BookshelfView.DETAIL
},
isAuthorBookshelfView() {
var constants = this.$constants || this.$nuxt.$constants
const constants = this.$constants || this.$nuxt.$constants
return this.bookshelfView === constants.BookshelfView.AUTHOR
},
titleDisplayBottomOffset() {
@ -552,7 +552,7 @@ export default {
},
rssFeed() {
if (this.booksInSeries) return null
return this.store.getters['feeds/getFeedForItem'](this.libraryItemId)
return this._libraryItem.rssFeed || null
}
},
methods: {

View file

@ -330,10 +330,10 @@ export default {
this.$store.commit('libraries/removeUserPlaylist', playlist)
},
rssFeedOpen(data) {
this.$store.commit('feeds/addFeed', data)
console.log('RSS Feed Open', data)
},
rssFeedClosed(data) {
this.$store.commit('feeds/removeFeed', data)
console.log('RSS Feed Closed', data)
},
backupApplied() {
// Force refresh

View file

@ -127,7 +127,6 @@ export default {
setUser({ user, userDefaultLibraryId, serverSettings, Source, feeds }) {
this.$store.commit('setServerSettings', serverSettings)
this.$store.commit('setSource', Source)
this.$store.commit('feeds/setFeeds', feeds)
this.$setServerLanguageCode(serverSettings.language)
if (serverSettings.chromecastEnabled) {

View file

@ -1,28 +0,0 @@
export const state = () => ({
feeds: []
})
export const getters = {
getFeedForItem: state => id => {
return state.feeds.find(feed => feed.id === id)
}
}
export const actions = {
}
export const mutations = {
addFeed(state, feed) {
var index = state.feeds.findIndex(f => f.id === feed.id)
if (index >= 0) state.feeds.splice(index, 1, feed)
else state.feeds.push(feed)
},
removeFeed(state, feed) {
state.feeds = state.feeds.filter(f => f.id !== feed.id)
},
setFeeds(state, feeds) {
state.feeds = feeds || []
}
}