mirror of
https://github.com/mempool/mempool.git
synced 2025-02-25 15:10:12 +01:00
Fix acceleration preview showing with fragment on accel txs
This commit is contained in:
parent
1dd86df3e0
commit
c3963d6a0d
1 changed files with 9 additions and 8 deletions
|
@ -747,6 +747,11 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
this.tx.acceleratedBy = cpfpInfo.acceleratedBy;
|
this.tx.acceleratedBy = cpfpInfo.acceleratedBy;
|
||||||
this.setIsAccelerated(firstCpfp);
|
this.setIsAccelerated(firstCpfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.isAcceleration && this.fragmentParams.has('accelerate')) {
|
||||||
|
this.onAccelerateClicked();
|
||||||
|
}
|
||||||
|
|
||||||
this.txChanged$.next(true);
|
this.txChanged$.next(true);
|
||||||
|
|
||||||
this.cpfpInfo = cpfpInfo;
|
this.cpfpInfo = cpfpInfo;
|
||||||
|
@ -884,17 +889,13 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
// simulate normal anchor fragment behavior
|
// simulate normal anchor fragment behavior
|
||||||
applyFragment(): void {
|
applyFragment(): void {
|
||||||
const anchor = Array.from(this.fragmentParams.entries()).find(([frag, value]) => value === '');
|
const anchor = Array.from(this.fragmentParams.entries()).find(([frag, value]) => value === '');
|
||||||
if (anchor?.length) {
|
if (anchor?.length && anchor[0] !== 'accelerate') {
|
||||||
if (anchor[0] === 'accelerate') {
|
|
||||||
setTimeout(this.onAccelerateClicked.bind(this), 100);
|
|
||||||
} else {
|
|
||||||
const anchorElement = document.getElementById(anchor[0]);
|
const anchorElement = document.getElementById(anchor[0]);
|
||||||
if (anchorElement) {
|
if (anchorElement) {
|
||||||
anchorElement.scrollIntoView();
|
anchorElement.scrollIntoView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@HostListener('window:resize', ['$event'])
|
@HostListener('window:resize', ['$event'])
|
||||||
setGraphSize(): void {
|
setGraphSize(): void {
|
||||||
|
|
Loading…
Add table
Reference in a new issue