Skip to content

Commit

Permalink
fix: lock app on inactive/backgournd state of app (except deeplinking)
Browse files Browse the repository at this point in the history
  • Loading branch information
themooneer committed Dec 6, 2024
1 parent 56fcd2a commit 2e915f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/good-lions-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

lock app on inactive/backgournd state of app (except deeplinking)
5 changes: 1 addition & 4 deletions apps/ledger-live-mobile/src/context/AuthPass/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ class AuthPass extends PureComponent<Props, State> {

// The state lifecycle differs between iOS and Android. This is to prevent FaceId from triggering an inactive state and looping.
isBackgrounded = (appState: string) => {
const isAppInBackground =
Platform.OS === "ios" ? appState === "background" : appState.match(/inactive|background/);

return isAppInBackground;
return appState.match(/inactive|background/);
};

// If the app reopened from the background, lock the app
Expand Down

0 comments on commit 2e915f2

Please sign in to comment.