Skip to content

Commit

Permalink
Update LazyBookCard progress calculation to handle finished items
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed May 9, 2024
1 parent 057bc1a commit 05c1ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/components/cards/LazyBookCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export default {
return progressPercent / this.libraryItemIdsInSeries.length
},
userProgressPercent() {
let progressPercent = this.booksInSeries ? this.seriesProgressPercent : this.useEBookProgress ? this.userProgress?.ebookProgress || 0 : this.userProgress?.progress || 0
let progressPercent = this.itemIsFinished ? 1 : this.booksInSeries ? this.seriesProgressPercent : this.useEBookProgress ? this.userProgress?.ebookProgress || 0 : this.userProgress?.progress || 0
return Math.max(Math.min(1, progressPercent), 0)
},
itemIsFinished() {
Expand Down

0 comments on commit 05c1ced

Please sign in to comment.