Misc Bugs (#510)
* Don't show bookmark context actionable for books * Fixed an issue where when adding a collection tag, the logic wouldn't assume the tag already existed in DB and would reset it. * After editing a series on library page, ensure we refresh collection tags. * Reload recently added section after changing a series * Moved all Stat logger events to Debug * Refactored scroll logic into a single service to keep the code consistent.
This commit is contained in:
parent
914c6f9349
commit
786fa146fb
13 changed files with 92 additions and 52 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<app-carousel-reel [items]="recentlyAdded" title="Recently Added" (sectionClick)="handleSectionClick($event)">
|
||||
<ng-template #carouselItem let-item let-position="idx">
|
||||
<app-series-card [data]="item" [libraryId]="item.libraryId"></app-series-card>
|
||||
<app-series-card [data]="item" [libraryId]="item.libraryId" (reload)="reloadTags()" (dataChanged)="loadRecentlyAdded()"></app-series-card>
|
||||
</ng-template>
|
||||
</app-carousel-reel>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|||
import { Subject } from 'rxjs';
|
||||
import { take, takeUntil } from 'rxjs/operators';
|
||||
import { EditCollectionTagsComponent } from '../cards/_modals/edit-collection-tags/edit-collection-tags.component';
|
||||
import { ScrollService } from '../scroll.service';
|
||||
import { CollectionTag } from '../_models/collection-tag';
|
||||
import { InProgressChapter } from '../_models/in-progress-chapter';
|
||||
import { Library } from '../_models/library';
|
||||
|
|
@ -42,7 +43,8 @@ export class LibraryComponent implements OnInit, OnDestroy {
|
|||
constructor(public accountService: AccountService, private libraryService: LibraryService,
|
||||
private seriesService: SeriesService, private actionFactoryService: ActionFactoryService,
|
||||
private collectionService: CollectionTagService, private router: Router,
|
||||
private modalService: NgbModal, private titleService: Title, public imageService: ImageService) { }
|
||||
private modalService: NgbModal, private titleService: Title, public imageService: ImageService,
|
||||
private scrollService: ScrollService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.titleService.setTitle('Kavita - Dashboard');
|
||||
|
|
@ -67,13 +69,9 @@ export class LibraryComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
reloadSeries() {
|
||||
this.seriesService.getRecentlyAdded(0, 0, 20).pipe(takeUntil(this.onDestroy)).subscribe(updatedSeries => {
|
||||
this.recentlyAdded = updatedSeries.result;
|
||||
});
|
||||
this.loadRecentlyAdded();
|
||||
|
||||
this.seriesService.getInProgress().pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => {
|
||||
this.inProgress = updatedSeries.result;
|
||||
});
|
||||
this.loadInProgress();
|
||||
|
||||
this.reloadTags();
|
||||
}
|
||||
|
|
@ -88,11 +86,20 @@ export class LibraryComponent implements OnInit, OnDestroy {
|
|||
return;
|
||||
}
|
||||
|
||||
this.loadInProgress();
|
||||
this.reloadTags();
|
||||
}
|
||||
|
||||
loadInProgress() {
|
||||
this.seriesService.getInProgress().pipe(takeUntil(this.onDestroy)).subscribe((updatedSeries) => {
|
||||
this.inProgress = updatedSeries.result;
|
||||
});
|
||||
|
||||
this.reloadTags();
|
||||
}
|
||||
|
||||
loadRecentlyAdded() {
|
||||
this.seriesService.getRecentlyAdded(0, 0, 20).pipe(takeUntil(this.onDestroy)).subscribe(updatedSeries => {
|
||||
this.recentlyAdded = updatedSeries.result;
|
||||
});
|
||||
}
|
||||
|
||||
reloadTags() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue