From db25affd4370f35a4d680461e2c1cbb976758cab Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 15 Feb 2022 12:57:56 -0600 Subject: [PATCH] Fix:Reactivity for book cards on home page --- client/components/cards/LazyBookCard.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index d2074a9b..be0a2a9a 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -118,6 +118,15 @@ export default { showCoverBg: false } }, + watch: { + bookMount: { + handler(newVal) { + if (newVal) { + this.audiobook = newVal + } + } + } + }, computed: { showExperimentalFeatures() { return this.store.state.showExperimentalFeatures @@ -198,8 +207,8 @@ export default { }, displaySortLine() { if (this.orderBy === 'addedAt') return 'Added ' + this.$formatDate(this._audiobook.addedAt) - if (this.orderBy === 'duration') return 'Duration: ' + this.$elapsedPrettyExtended(this._audiobook.duration, false) - if (this.orderBy === 'size') return 'Size: ' + this.$bytesPretty(this._audiobook.size) + if (this.orderBy === 'duration') return 'Duration: ' + this.$elapsedPrettyExtended(this._audiobook.duration, false) + if (this.orderBy === 'size') return 'Size: ' + this.$bytesPretty(this._audiobook.size) return null }, userProgress() {