[LN ISP chart] Only show "Tor node excluded" when appropriate

This commit is contained in:
nymkappa
2022-07-27 15:33:25 +02:00
parent 91c39b57fe
commit 1fbad2d709
2 changed files with 5 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ export class NodesPerISPChartComponent implements OnInit {
@HostBinding('attr.dir') dir = 'ltr';
nodesPerAsObservable$: Observable<any>;
showTorObservable$: Observable<boolean>;
groupBySubject = new Subject<boolean>();
showTorSubject = new Subject<boolean>();
@@ -44,6 +45,7 @@ export class NodesPerISPChartComponent implements OnInit {
ngOnInit(): void {
this.seoService.setTitle($localize`Lightning nodes per ISP`);
this.showTorObservable$ = this.showTorSubject.asObservable();
this.nodesPerAsObservable$ = combineLatest([this.groupBySubject, this.showTorSubject])
.pipe(
switchMap((selectedFilters) => {