Merge branch 'master' into hunicus/enterprise-cta-docs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, Input, QueryList, AfterViewInit, ViewChildren } from '@angular/core';
|
||||
import { Env, StateService } from '../../services/state.service';
|
||||
import { Observable, merge, of, Subject } from 'rxjs';
|
||||
import { Observable, merge, of, Subject, Subscription } from 'rxjs';
|
||||
import { tap, takeUntil } from 'rxjs/operators';
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { faqData, restApiDocsData, wsApiDocsData } from './api-docs-data';
|
||||
@@ -31,6 +31,8 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
|
||||
auditEnabled: boolean;
|
||||
mobileViewport: boolean = false;
|
||||
showMobileEnterpriseUpsell: boolean = true;
|
||||
timeLtrSubscription: Subscription;
|
||||
timeLtr: boolean = this.stateService.timeLtr.value;
|
||||
|
||||
@ViewChildren(FaqTemplateDirective) faqTemplates: QueryList<FaqTemplateDirective>;
|
||||
dict = {};
|
||||
@@ -105,12 +107,17 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
|
||||
this.electrsPort = 51302; break;
|
||||
}
|
||||
});
|
||||
|
||||
this.timeLtrSubscription = this.stateService.timeLtr.subscribe((ltr) => {
|
||||
this.timeLtr = !!ltr;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.destroy$.next(true);
|
||||
this.destroy$.complete();
|
||||
window.removeEventListener('scroll', this.onDocScroll);
|
||||
this.timeLtrSubscription.unsubscribe();
|
||||
}
|
||||
|
||||
onDocScroll() {
|
||||
|
||||
Reference in New Issue
Block a user