Interlude/Half Volumes (#626)

* Refactored Parser to handle parts

* Fixed a bug where marking multiple entities as unread would actually make them look read on the UI

* Implemented the ability to have float volume numbers

* Removed two unit test cases

* Code smells
This commit is contained in:
Joseph Milazzo 2021-10-03 13:30:31 -07:00 committed by GitHub
parent d4507e3288
commit 6e85fe8c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 62 deletions

View file

@ -245,10 +245,10 @@ export class ActionService implements OnDestroy {
markMultipleAsUnread(seriesId: number, volumes: Array<Volume>, chapters?: Array<Chapter>, callback?: VoidActionCallback) {
this.readerService.markMultipleUnread(seriesId, volumes.map(v => v.id), chapters?.map(c => c.id)).pipe(take(1)).subscribe(() => {
volumes.forEach(volume => {
volume.pagesRead = volume.pages;
volume.chapters?.forEach(c => c.pagesRead = c.pages);
volume.pagesRead = 0;
volume.chapters?.forEach(c => c.pagesRead = 0);
});
chapters?.forEach(c => c.pagesRead = c.pages);
chapters?.forEach(c => c.pagesRead = 0);
this.toastr.success('Marked as Read');
if (callback) {