Release Shakeout 3 (#1597)
* Fixed a bug where bulk selection on series detail wouldn't allow you to select the whole card, only the checkbox. * Refactored the implementation of MarkChaptersAsRead to streamline it. * Fixed a bug where volume cards weren't properly updating their read state based on events from backend. * Added [ScannerService] to more loggers * Fixed invite user flow * Fixed broken edit user flow * Fixed calling device service on unauthenticated screens causing redirection * Fixed reset password via email not working when success message was sent back * Fixed broken white theme on book reader * Small tweaks to white theme * More fixes * Adjusted AutomaticRetries
This commit is contained in:
parent
b396217e7d
commit
dbe1152d87
16 changed files with 224 additions and 66 deletions
|
|
@ -188,19 +188,27 @@ export class CardItemComponent implements OnInit, OnDestroy {
|
|||
if (this.utilityService.isSeries(this.entity) && updateEvent.seriesId !== this.entity.id) return;
|
||||
|
||||
// For volume or Series, we can't just take the event
|
||||
if (this.utilityService.isChapter(this.entity)) {
|
||||
const c = this.utilityService.asChapter(this.entity);
|
||||
c.pagesRead = updateEvent.pagesRead;
|
||||
this.read = updateEvent.pagesRead;
|
||||
}
|
||||
if (this.utilityService.isVolume(this.entity) || this.utilityService.isSeries(this.entity)) {
|
||||
if (this.utilityService.isVolume(this.entity)) {
|
||||
const v = this.utilityService.asVolume(this.entity);
|
||||
const chapter = v.chapters.find(c => c.id === updateEvent.chapterId);
|
||||
if (chapter) {
|
||||
let sum = 0;
|
||||
const chapters = v.chapters.filter(c => c.volumeId === updateEvent.volumeId);
|
||||
chapters.forEach(chapter => {
|
||||
chapter.pagesRead = updateEvent.pagesRead;
|
||||
}
|
||||
sum += chapter.pagesRead;
|
||||
});
|
||||
v.pagesRead = sum;
|
||||
this.read = sum;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.read = updateEvent.pagesRead;
|
||||
this.cdRef.detectChanges();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue