Skip to content

Commit

Permalink
mobile: fix configure note activity not showing biometric unlock prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Feb 4, 2025
1 parent 42f9bf1 commit 96310a4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/mobile/app/components/app-lock-overlay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,19 @@ const AppLockedOverlay = () => {
if (
!biometricsAuthEnabled ||
!(await BiometricService.isBiometryAvailable())
)
) {
return;
}

biometricUnlockAwaitingUserInput.current = true;

if (Platform.OS === "android") {
const activityName = await NotesnookModule.getActivityName();
if (activityName !== "MainActivity") return;
if (
activityName !== "MainActivity" &&
activityName !== "NotePreviewConfigureActivity"
)
return;
}
useSettingStore.getState().setRequestBiometrics(true);

Expand Down Expand Up @@ -180,7 +185,6 @@ const AppLockedOverlay = () => {
DatabaseLogger.info("Locking app on entering foreground");
useUserStore.getState().lockApp(true);
}

if (
!(
biometricUnlockAwaitingUserInput.current ||
Expand Down

0 comments on commit 96310a4

Please sign in to comment.