From 51a50bb3244c33f991778fd8d7907626e539dfae Mon Sep 17 00:00:00 2001 From: Suyash Patil <127177049+suyashpatil78@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:15:53 +0530 Subject: [PATCH] fix: when redirected to reports page, it is coming up twice (#3120) --- src/app/fyle/my-expenses/my-expenses.page.spec.ts | 1 + src/app/fyle/my-expenses/my-expenses.page.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/fyle/my-expenses/my-expenses.page.spec.ts b/src/app/fyle/my-expenses/my-expenses.page.spec.ts index 64dc87b561..53dfcc80f8 100644 --- a/src/app/fyle/my-expenses/my-expenses.page.spec.ts +++ b/src/app/fyle/my-expenses/my-expenses.page.spec.ts @@ -3283,6 +3283,7 @@ describe('MyExpensesPage', () => { key: 'OPT_IN_POPUP_SHOWN_COUNT', }); expect(component.showPromoteOptInModal).toHaveBeenCalledTimes(1); + expect(utilityService.toggleShowOptInAfterExpenseCreation).toHaveBeenCalledOnceWith(false); })); it('setModalDelay(): should set optInShowTimer and call showPromoteOptInModal after 2 seconds', fakeAsync(() => { diff --git a/src/app/fyle/my-expenses/my-expenses.page.ts b/src/app/fyle/my-expenses/my-expenses.page.ts index c5e9dd1bca..0862168582 100644 --- a/src/app/fyle/my-expenses/my-expenses.page.ts +++ b/src/app/fyle/my-expenses/my-expenses.page.ts @@ -806,6 +806,7 @@ export class MyExpensesPage implements OnInit { if (isAttemptLeft && isRedirectedFromAddExpense && canShowOptInModal) { this.showPromoteOptInModal(); + this.utilityService.toggleShowOptInAfterExpenseCreation(false); } }); }