Skip to content

Commit d91bc4b

Browse files
committed
update: added deauth on background, improved package json
1 parent 27f6a6b commit d91bc4b

4 files changed

Lines changed: 395 additions & 388 deletions

File tree

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "Notudus",
44
"slug": "notudus-app",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"orientation": "portrait",
77
"icon": "./assets/images/icon.png",
88
"scheme": "myapp",

app/(tabs)/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useEffect, useState, useCallback, useMemo, useRef } from 'react'
2-
import { FlatList, StyleSheet, Alert } from 'react-native'
2+
import { FlatList, StyleSheet, Alert, AppState, AppStateStatus } from 'react-native'
33
import { SafeAreaView } from 'react-native-safe-area-context'
44
import ListNoteItem from '@/components/notes/ListNoteItem'
55
import TopBar from '@/components/shared/TopBar'
@@ -33,6 +33,16 @@ export default function NotesScreen() {
3333

3434
const filteredNotes = useMemo(() => Note.getNotes(auth), [auth])
3535

36+
/** Adds a listener to the AppState to check if the app is in the background. If it is, it sets the authentication to false.*/
37+
useEffect(() => {
38+
const subscription = AppState.addEventListener('change', (nextAppState: AppStateStatus) => {
39+
if (nextAppState === 'background') {
40+
setAuth(false)
41+
}
42+
})
43+
return () => subscription.remove()
44+
}, [])
45+
3646
/** This function opens the search overlay when the search icon is pressed.*/
3747
const handleSearchPress = (): void => setIsSearchVisible(true)
3848

package.json

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "notudus-app",
33
"main": "expo-router/entry",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"scripts": {
66
"start": "expo start",
77
"reset-project": "node ./scripts/reset-project.js",
@@ -12,48 +12,53 @@
1212
"lint": "expo lint"
1313
},
1414
"expo": {},
15+
"pnpm": {
16+
"overrides": {
17+
"@tootallnate/once@<3.0.1": ">=3.0.1"
18+
}
19+
},
1520
"jest": {
1621
"preset": "jest-expo"
1722
},
1823
"dependencies": {
19-
"@expo/vector-icons": "^15.0.3",
24+
"@expo/vector-icons": "15.0.3",
2025
"@react-native-async-storage/async-storage": "2.2.0",
21-
"@react-navigation/native": "^7.1.8",
22-
"expo": "^54.0.32",
23-
"expo-build-properties": "~1.0.10",
24-
"expo-constants": "~18.0.13",
25-
"expo-font": "~14.0.10",
26-
"expo-linking": "~8.0.11",
27-
"expo-local-authentication": "~17.0.8",
28-
"expo-router": "^6.0.21",
29-
"expo-splash-screen": "~31.0.13",
30-
"expo-sqlite": "~16.0.10",
31-
"expo-status-bar": "~3.0.9",
32-
"expo-system-ui": "~6.0.9",
33-
"expo-web-browser": "~15.0.10",
34-
"lottie-react-native": "~7.3.1",
26+
"@react-navigation/native": "7.1.8",
27+
"expo": "54.0.33",
28+
"expo-build-properties": "1.0.10",
29+
"expo-constants": "18.0.13",
30+
"expo-font": "14.0.11",
31+
"expo-linking": "8.0.11",
32+
"expo-local-authentication": "17.0.8",
33+
"expo-router": "6.0.23",
34+
"expo-splash-screen": "31.0.13",
35+
"expo-sqlite": "16.0.10",
36+
"expo-status-bar": "3.0.9",
37+
"expo-system-ui": "6.0.9",
38+
"expo-web-browser": "15.0.10",
39+
"lottie-react-native": "7.3.1",
3540
"react": "19.1.0",
3641
"react-dom": "19.1.0",
3742
"react-native": "0.81.5",
38-
"react-native-gesture-handler": "~2.28.0",
39-
"react-native-get-random-values": "^1.11.0",
40-
"react-native-reanimated": "~4.1.1",
41-
"react-native-safe-area-context": "~5.6.0",
42-
"react-native-screens": "~4.16.0",
43-
"react-native-web": "^0.21.0",
44-
"react-native-worklets": "^0.5.1",
45-
"uuid": "^10.0.0"
43+
"react-native-gesture-handler": "2.28.0",
44+
"react-native-get-random-values": "1.11.0",
45+
"react-native-reanimated": "4.1.1",
46+
"react-native-safe-area-context": "5.6.0",
47+
"react-native-screens": "4.16.0",
48+
"react-native-web": "0.21.0",
49+
"react-native-worklets": "0.5.1",
50+
"uuid": "10.0.0"
4651
},
4752
"devDependencies": {
48-
"@babel/core": "^7.20.0",
49-
"@types/jest": "^29.5.12",
50-
"@types/react": "~19.1.10",
51-
"@types/react-test-renderer": "^18.0.7",
52-
"@types/uuid": "^10.0.0",
53-
"jest": "^29.2.1",
54-
"jest-expo": "^54.0.16",
53+
"@babel/core": "7.29.0",
54+
"@types/jest": "29.5.14",
55+
"@types/react": "19.1.10",
56+
"@types/react-test-renderer": "18.0.7",
57+
"@types/uuid": "10.0.0",
58+
"jest": "29.7.0",
59+
"jest-expo": "54.0.17",
5560
"react-test-renderer": "19.1.4",
56-
"typescript": "^5.9.3"
61+
"typescript": "5.9.3"
5762
},
5863
"private": true
5964
}

0 commit comments

Comments
 (0)