feat: auto-activate biometrics prompt when mobile regains focus (#1891)

This commit is contained in:
Aman Harwara
2022-10-27 02:02:33 +05:30
committed by GitHub
parent d817a2115e
commit 3bd1ad38ad
5 changed files with 72 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ import {
ThemeManager,
WebAlertService,
} from '@standardnotes/ui-services'
import { MobileWebReceiver } from '../NativeMobileWeb/MobileWebReceiver'
import { MobileWebReceiver, NativeMobileEventListener } from '../NativeMobileWeb/MobileWebReceiver'
import { AndroidBackHandler } from '@/NativeMobileWeb/AndroidBackHandler'
import { PrefDefaults } from '@/Constants/PrefDefaults'
import { setViewportHeightWithFallback } from '@/setViewportHeightWithFallback'
@@ -330,4 +330,12 @@ export class WebApplication extends SNApplication implements WebApplicationInter
openPurchaseFlow(): void {
this.getViewControllerManager().purchaseFlowController.openPurchaseFlow()
}
addNativeMobileEventListener = (listener: NativeMobileEventListener) => {
if (!this.mobileWebReceiver) {
return
}
return this.mobileWebReceiver.addReactListener(listener)
}
}