Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Commit

Permalink
Fixed loading series after marking searies unread/read (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
majora2007 authored Apr 15, 2021
1 parent e807ae5 commit 2fb4b53
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/series-detail/series-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,17 @@ export class SeriesDetailComponent implements OnInit {

markSeriesAsUnread(series: Series) {
this.seriesService.markUnread(series.id).subscribe(res => {
this.loadSeries(series.id);
this.toastr.success(series.name + ' is now unread');
series.pagesRead = 0;
this.loadSeries(series.id);
});
}

markSeriesAsRead(series: Series) {
this.seriesService.markRead(series.id).subscribe(res => {
this.loadSeries(series.id);
this.toastr.success(series.name + ' is now read');
series.pagesRead = series.pages;
this.loadSeries(series.id);
});
}

Expand Down Expand Up @@ -269,8 +269,8 @@ export class SeriesDetailComponent implements OnInit {

this.readerService.bookmark(seriesId, chapter.volumeId, chapter.id, chapter.pages).subscribe(results => {
this.toastr.success('Marked as Read');
this.setContinuePoint();
chapter.pagesRead = chapter.pages;
this.setContinuePoint();
});
}

Expand Down Expand Up @@ -298,7 +298,9 @@ export class SeriesDetailComponent implements OnInit {
return;
}

this.seriesService.updateRating(this.series?.id, this.series?.userRating, this.series?.userReview).subscribe(() => {});
this.seriesService.updateRating(this.series?.id, this.series?.userRating, this.series?.userReview).subscribe(() => {
this.createHTML();
});
}

openChapter(chapter: Chapter) {
Expand Down

0 comments on commit 2fb4b53

Please sign in to comment.