From 4d1e43cc76ffba51b49b81c319bf0b2dcfb162b5 Mon Sep 17 00:00:00 2001 From: Olga Shen Date: Thu, 25 Jul 2024 16:05:09 +0800 Subject: [PATCH] fix(features/home): resolve lint error --- .../features/home/capture-tab/capture-tab.component.ts | 10 +++++----- src/app/features/home/home.page.ts | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/app/features/home/capture-tab/capture-tab.component.ts b/src/app/features/home/capture-tab/capture-tab.component.ts index 292c5564d..18630a3ac 100644 --- a/src/app/features/home/capture-tab/capture-tab.component.ts +++ b/src/app/features/home/capture-tab/capture-tab.component.ts @@ -162,6 +162,10 @@ export class CaptureTabComponent implements OnInit { .subscribe(value => (this.pendingUploadTasks = value)); } + static async openFaq() { + await Browser.open({ url: getFaqUrl(), toolbarColor: browserToolbarColor }); + } + ngOnInit(): void { this.initSegmentListener(); } @@ -216,7 +220,7 @@ export class CaptureTabComponent implements OnInit { }, { text: this.translocoService.translate('faq'), - handler: async () => await this.openFaq(), + handler: async () => await CaptureTabComponent.openFaq(), }, { text: this.translocoService.translate('logout'), @@ -251,10 +255,6 @@ export class CaptureTabComponent implements OnInit { .subscribe(); } - async openFaq() { - await Browser.open({ url: getFaqUrl(), toolbarColor: browserToolbarColor }); - } - async editUsername() { const alert = await this.alertController.create({ header: this.translocoService.translate('editUsername'), diff --git a/src/app/features/home/home.page.ts b/src/app/features/home/home.page.ts index e72e26837..09a252800 100644 --- a/src/app/features/home/home.page.ts +++ b/src/app/features/home/home.page.ts @@ -68,8 +68,6 @@ export class HomePage { readonly username$ = this.diaBackendAuthService.username$; - private readonly userGuideIsTemporarelyDisabled = true; - readonly hasNewInbox$ = this.diaBackendTransactionRepository.inbox$.pipe( catchError((err: unknown) => this.errorService.toastError$(err)), map(transactions => transactions.count !== 0), @@ -471,6 +469,7 @@ export class HomePage { .subscribe(); } + // eslint-disable-next-line class-methods-use-this async openFaq() { await Browser.open({ url: getFaqUrl(), toolbarColor: browserToolbarColor }); }