mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 15:34:17 +01:00
fix(webui): properly reload series when book read progress is updated
This commit is contained in:
parent
ada1438921
commit
92954e0916
4 changed files with 12 additions and 5 deletions
|
|
@ -368,7 +368,7 @@ export default Vue.extend({
|
|||
},
|
||||
reloadSeries: throttle(function (this: any) {
|
||||
this.loadSeries(this.collectionId)
|
||||
}, 5000),
|
||||
}, 1000),
|
||||
async loadSeries(collectionId: string) {
|
||||
let authorsFilter = [] as AuthorDto[]
|
||||
authorRoles.forEach((role: string) => {
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ export default Vue.extend({
|
|||
},
|
||||
reloadPage: throttle(function (this: any) {
|
||||
this.loadPage(this.libraryId, this.page, this.sortActive)
|
||||
}, 5000),
|
||||
}, 1000),
|
||||
async loadPage(libraryId: string, page: number, sort: SortActive) {
|
||||
this.selectedSeries = []
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ export default Vue.extend({
|
|||
},
|
||||
reloadBooks: throttle(function (this: any) {
|
||||
this.loadBooks(this.readListId)
|
||||
}, 5000),
|
||||
}, 1000),
|
||||
editSingleBook (book: BookDto) {
|
||||
this.$store.dispatch('dialogUpdateBooks', book)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -686,7 +686,10 @@ export default Vue.extend({
|
|||
if (event.seriesId === this.seriesId) this.reloadPage()
|
||||
},
|
||||
readProgressChanged(event: ReadProgressSseDto) {
|
||||
if (this.books.some(b => b.id === event.bookId)) this.reloadPage()
|
||||
if (this.books.some(b => b.id === event.bookId)) {
|
||||
this.reloadPage()
|
||||
this.reloadSeries()
|
||||
}
|
||||
},
|
||||
collectionChanged(event: CollectionSseDto) {
|
||||
if (event.seriesIds.includes(this.seriesId) || this.collections.map(x => x.id).includes(event.collectionId)) {
|
||||
|
|
@ -696,7 +699,11 @@ export default Vue.extend({
|
|||
},
|
||||
reloadPage: throttle(function (this: any) {
|
||||
this.loadPage(this.seriesId, this.page, this.sortActive)
|
||||
}, 5000),
|
||||
}, 1000),
|
||||
reloadSeries: throttle(function (this: any) {
|
||||
this.$komgaSeries.getOneSeries(this.seriesId)
|
||||
.then((v: SeriesDto) => this.series = v)
|
||||
}, 1000),
|
||||
async loadSeries(seriesId: string) {
|
||||
this.$komgaSeries.getOneSeries(seriesId)
|
||||
.then(v => this.series = v)
|
||||
|
|
|
|||
Loading…
Reference in a new issue