Lots of Bugfixes (#3308)

This commit is contained in:
Joe Milazzo 2024-10-25 09:22:12 -07:00 committed by GitHub
parent ed7e9d4a6e
commit fc269d3dd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 331 additions and 588 deletions

View file

@ -171,18 +171,6 @@ export class CollectionDetailComponent implements OnInit, AfterContentChecked {
}
}
get ScrollingBlockHeight() {
if (this.scrollingBlock === undefined) return 'calc(var(--vh)*100)';
const navbar = this.document.querySelector('.navbar') as HTMLElement;
if (navbar === null) return 'calc(var(--vh)*100)';
const companionHeight = this.companionBar!.nativeElement.offsetHeight;
const navbarHeight = navbar.offsetHeight;
const totalHeight = companionHeight + navbarHeight + 21; //21px to account for padding
return 'calc(var(--vh)*100 - ' + totalHeight + 'px)';
}
constructor(@Inject(DOCUMENT) private document: Document) {
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
@ -299,10 +287,16 @@ export class CollectionDetailComponent implements OnInit, AfterContentChecked {
}
switch (action.action) {
case Action.Promote:
this.collectionService.promoteMultipleCollections([this.collectionTag.id], true).subscribe();
this.collectionService.promoteMultipleCollections([this.collectionTag.id], true).subscribe(() => {
this.collectionTag.promoted = true;
this.cdRef.markForCheck();
});
break;
case Action.UnPromote:
this.collectionService.promoteMultipleCollections([this.collectionTag.id], false).subscribe();
this.collectionService.promoteMultipleCollections([this.collectionTag.id], false).subscribe(() => {
this.collectionTag.promoted = false;
this.cdRef.markForCheck();
});
break;
case(Action.Edit):
this.openEditCollectionTagModal(this.collectionTag);