[MOBILEAPPS-1701] Custom URL schema issues fixed (#2998)

* Custom URL schema issues

* code implementation changes for checkForMobileAppFlag

* updated test cases

* requested changed addressed

* requested changed addressed

* cspell changes

* review comments addressed
This commit is contained in:
Jatin Chugh
2023-02-20 21:16:09 +05:30
committed by GitHub
parent 472a19b67d
commit 04907df376
9 changed files with 169 additions and 108 deletions

View File

@@ -24,7 +24,7 @@
*/
import { Component, Inject, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
export interface OpenInAppDialogOptions {
redirectUrl: string;
@@ -41,7 +41,8 @@ export class OpenInAppComponent {
constructor(
@Inject(MAT_DIALOG_DATA)
public data: OpenInAppDialogOptions
public data: OpenInAppDialogOptions,
private dialog: MatDialogRef<OpenInAppComponent>
) {
if (data) {
this.redirectUrl = data.redirectUrl;
@@ -51,4 +52,10 @@ export class OpenInAppComponent {
openInApp(): void {
this.window.location.href = this.redirectUrl;
}
onCloseDialog(): void {
const time: number = new Date().getTime();
sessionStorage.setItem('mobile_notification_expires_in', time.toString());
this.dialog.close();
}
}