Reset blockchain scroll on logo click
This commit is contained in:
@@ -25,6 +25,7 @@ export class StartComponent implements OnInit, OnDestroy {
|
||||
markBlockSubscription: Subscription;
|
||||
blockCounterSubscription: Subscription;
|
||||
@ViewChild('blockchainContainer') blockchainContainer: ElementRef;
|
||||
resetScrollSubscription: Subscription;
|
||||
|
||||
isMobile: boolean = false;
|
||||
isiOS: boolean = false;
|
||||
@@ -106,6 +107,12 @@ export class StartComponent implements OnInit, OnDestroy {
|
||||
}, 60 * 60 * 1000);
|
||||
}
|
||||
});
|
||||
this.resetScrollSubscription = this.stateService.resetScroll$.subscribe(reset => {
|
||||
if (reset) {
|
||||
this.resetScroll();
|
||||
this.stateService.resetScroll$.next(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@HostListener('window:resize', ['$event'])
|
||||
@@ -385,5 +392,6 @@ export class StartComponent implements OnInit, OnDestroy {
|
||||
this.chainTipSubscription.unsubscribe();
|
||||
this.markBlockSubscription.unsubscribe();
|
||||
this.blockCounterSubscription.unsubscribe();
|
||||
this.resetScrollSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user