mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 14:50:52 +01:00
Remove duplicated ChangeDetectorRef in blockchains blocks component
This commit is contained in:
parent
fb2c0345a7
commit
008a4b51cc
2 changed files with 5 additions and 6 deletions
|
@ -21,10 +21,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="time-difference"><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since></div>
|
<div class="time-difference"><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="animated" [class]="showMiningInfo ? 'show' : 'hide'" *ngIf="block.extras?.pool != undefined">
|
<div class="animated" [class]="showMiningInfo ? 'show' : 'hide'" *ngIf="block.extras?.pool != undefined">
|
||||||
<a class="badge badge-primary" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
|
<a class="badge badge-primary" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
|
||||||
{{ block.extras.pool.name}}</a>
|
{{ block.extras.pool.name}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!arrowVisible" id="arrow-up" [style.transition]="transition" [ngStyle]="{'left': arrowLeftPx + 'px' }"></div>
|
<div [hidden]="!arrowVisible" id="arrow-up" [style.transition]="transition" [ngStyle]="{'left': arrowLeftPx + 'px' }"></div>
|
||||||
|
|
|
@ -47,13 +47,12 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||||
public stateService: StateService,
|
public stateService: StateService,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
private cdr: ChangeDetectorRef
|
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
enabledMiningInfoIfNeeded(url) {
|
enabledMiningInfoIfNeeded(url) {
|
||||||
this.showMiningInfo = url === '/mining';
|
this.showMiningInfo = url === '/mining';
|
||||||
this.cdr.detectChanges(); // Need to update the view asap
|
this.cd.markForCheck(); // Need to update the view asap
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue